Introducing a comprehensive guide to efficiently automate the process of publishing posts on your Facebook page.
- Python 3
- Account and app on Meta for Developers
- Account on Microsoft Azure
Create an access token for the Facebook Graph API that never expires.
- Refer Graph Explorer to obtain your
Page ID
andPage name
, which will be utilized in the environment.
- Refer Pages API - Access Token to generate a Long-lived Page Access Token.
- Go to Access token debugger to see detailed info for an access token. Paste the Long-Lived Page Access Token and hit the
Debug
button. - Copy the
App-Scoped User ID
. - Paste App-Scoped User ID and Long-lived Page Access Token to the below endpoint and hit the same.
https://graph.facebook.com/v17.0/{app_scoped_user_id}/accounts?access_token={long_lived_access_token}
- This will provide you with a JSON response containing an access_token that never expires.
Subscribe to Bing News Search API and generate an access token.
Explore Azure Functions to set up your serverless computing service and create a Timer trigger Azure Functions, a cron script for executing your code.
- Refer Application Settings in the
Function App
to configure the environment variables. - Refer Functions deployment to run the function locally and deploy your project & function app.
Distributed under the GNU License. See LICENSE for more information.