I have spent a long time searching the API docs and google for a solution and really haven't been able to find a solution that meets my needs. So my question is simple, what would be the most simple way for me to use cron + php to make a facebook post for a page?
Asked
Active
Viewed 861 times
-1

Sahil Mittal
- 20,697
- 12
- 65
- 90

Nathan
- 409
- 4
- 15
-
Run a php script from the command line? – fge Dec 22 '12 at 17:20
1 Answers
1
Use Simple Feed API of fb with the access_token.
If you are posting as the app, you'll be needing the access_token of the app (which never expires). You can get the token from here: AccessTokens
If you to post on behalf of a user, you'll be needing the access_token of the user. The normal access token expires in 2 hours, and the extended token lasts for 2 months. Use the extended token for the cron job. Ref: How to extend access token validity since offline_access deprecation

Community
- 1
- 1

Sahil Mittal
- 20,697
- 12
- 65
- 90