I’ve been reading the facebook API for the past couple hours and unable to put together a solution for this.
I have a FB page for my website.
I have a scheduled job that I want it to post to that FB page.
That’s the scenario I need.
However, I don’t think the FB Graph API works that way.
The way I understand it is that I need to first authenticate as a user, passing the manage_pages permission to get a list of my pages with their page access_tokens.
THEN I can use the page’s access_token to post to the page.
But the thing is that to “authenticate as a user”, all FB API calls require that I “redirect” the user to an FB login page… but this is a scheduled job, which will run unattended with no user interface.
The closest thing I got to was this: Authentication for devices without access to a browser, but this is following the same logic, by asking the “user” to take a token, go login to facebook, then come back with permission… so, again, user interaction.
How can I simply AUTOMATE posting to a FB page? No user interaction involved!
Or is that against FB’s usage agreement?
Thanks.
This is easily enough done.
Once you have the access_token all you need to do is append that to any request made to the Graph API. There is no need to go through authentication again. Authentication is only there to get the access token in the first place.
I don’t know what language you are using so I can’t give a specific example.
But you will be posting to the
You can see a PHP example here: http://facebook.stackoverflow.com/a/3429737/540339