I am trying to automatically display wall posts from a Facebook page another website. I can use the Graph API explorer to get one manually. When I use the generated token in
For graph objects that are not private (public) you can use your app_id as an access_token.
Your app_id never changes so you don't ever have to renew it. The question is is the wall content yours?
If so you can easily use your app_id
to accomplish this without having to request an access token everytime.
However, in order to have an app_id you need to create an application on facebook with a facebook developer account. As far as I understand there isnt a way to anonymously make request to the Graph API,
Use the app-id to build this link to authorize the managing of pages https://www.facebook.com/dialog/oauth?client_id=MY_CLIENT_ID&redirect_uri=MY_SITE_URL&scope=manage_pages&response_type=token
Exchange token for perm (longer token)
https://graph.facebook.com/oauth/access_token?client_id=MY_CLIENT_ID&client_secret=MY_CLIENT_SECRET&grant_type=fb_exchange_token&fb_exchange_token=(from link1)
Visit this page, find the PAGE you want to post and copy the new access_token https://graph.facebook.com/me/accounts?access_token= (from link2)
Use this last token (form link3) to post to page as app
Take note as it will expire in 60 days. (FB no longer offering unlimited offline access token)
Edit (2013 Oct 24): 5th point no longer true, Page Access Tokens generated from long-lived User Tokens do not expire.
Edit (Feb 2016): Tokens now "usually" expire in 60 days but can be invalidated at any time.