I'd like to show my facebook wall posts on my website. So i don't want to authenticate users with a dialog, to grant them some rights, i just want to show him my wall with comments (no ability to add comment just read only access).
As i know there isn't unexpired tokens now so is it possible to access just my data without requesting token every time it expires?
I'm using asp.net mvc but i think this sultion doesn't depend at platform at all.
You should:
- Make your Facebook Posts public
- Call the API endpoint: https://graph.facebook.com/{your_id}/feed?access_token={app_access_token} with your
user_id
and valid applicationaccess_token
- Show the results on your website.
The App Access Token doesn't expire so you won't have a problem. As long as the posts are public, the API will be able to pick them up. In theory, your posts should be public anyway so anonymous users can see this.
This also gives you the ability to share stuff privately and not have it show up on your website.
来源:https://stackoverflow.com/questions/11189682/no-access-token-facebook-application-authentication