{"id":28283398,"url":"https://github.com/oldravian/fb-autopost-agent","last_synced_at":"2025-06-17T09:31:27.848Z","repository":{"id":189852396,"uuid":"681221699","full_name":"oldravian/fb-autopost-agent","owner":"oldravian","description":"Automatically generate post descriptions and tags using Openai API (by getting the latest news from RSS feeds) then publish them on the Facebook page using Facebook Graph API.","archived":false,"fork":false,"pushed_at":"2025-05-06T13:04:33.000Z","size":440,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-21T16:15:52.281Z","etag":null,"topics":["automation","chatgpt-api","facebook-graph-api","openai-api","openai-chatgpt","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oldravian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-21T14:34:03.000Z","updated_at":"2025-05-06T13:04:37.000Z","dependencies_parsed_at":"2023-08-22T04:07:59.938Z","dependency_job_id":null,"html_url":"https://github.com/oldravian/fb-autopost-agent","commit_stats":null,"previous_names":["oldravian/fb-autopost-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oldravian/fb-autopost-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldravian%2Ffb-autopost-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldravian%2Ffb-autopost-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldravian%2Ffb-autopost-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldravian%2Ffb-autopost-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oldravian","download_url":"https://codeload.github.com/oldravian/fb-autopost-agent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldravian%2Ffb-autopost-agent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260328524,"owners_count":22992707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","chatgpt-api","facebook-graph-api","openai-api","openai-chatgpt","php"],"created_at":"2025-05-21T16:14:58.165Z","updated_at":"2025-06-17T09:31:27.833Z","avatar_url":"https://github.com/oldravian.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facebook AutoPost Agent\nAutomatically generate post descriptions and tags using Openai API (by getting the latest news from RSS feeds) then publish them on the Facebook page using Facebook Graph API.\n\n# Some of the posts that are auto-generated \u0026 posted by this script on a Facebook page:\n\n![screenshot-1](screenshot/Screenshot-1.png)\n\n![screenshot-2](screenshot/Screenshot-2.png)\n\n# Working of this script\n- Get a random feed URL from one of the URLs provided in the .env file\n- Get the top item title and link. Then use Openai API to convert that title into an engaging Facebook post description and also generate tags\n- Use Facebook Graph API to post that description and link on the page.\n\n# Script Installation\n- After downloading or cloning the repo, run\n```\ncomposer install\n```\n- copy .env.example into .env\n- put the credentials in .env. Here are some comments about how to get that env variable\n\n```\n#create a Facebook App with the type \"Business\" and add these permissions to the app \"pages_manage_posts, pages_read_engagement\"\n#Also, you don't need the app for App review if you are the manager of the page\n#Cope the app id and secret and paste it below\nfcebook_app_id=\"\"\nfacebook_app_secret=\"\"\n\n#generate from https://developers.facebook.com/tools/explorer\nshort_lived_user_access_token=\"\"\n\n#go to your Facebook page, then click the \"About\" tab then click \"Page Transparency\". Finally, copy the page id\nfacebook_page_id=\"\"\n\n#generate the following token from generate-token.php\nlong_lived_page_access_token=\"\"\n\n#comma separated rss feed urls\n\nrss_feeds=\"https://machinethink.net/blog/index.xml, https://www.marketingaiinstitute.com/blog/rss.xml, https://learn.microsoft.com/en-us/archive/blogs/machinelearning/feed.xml\"\n\n#get your api key from your openai account\nopenai_api_key=\"\"\n```\n\n- Finally run cron.php as a cron job to auto-run the script after the specific intervals (hourly, daily, etc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foldravian%2Ffb-autopost-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foldravian%2Ffb-autopost-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foldravian%2Ffb-autopost-agent/lists"}