Facebook - permanent user access token

冷暖自知 提交于 2019-11-30 20:42:19
Vlasec

Your question is about user access tokens. I'm afraid those can never be permanent. However, from your discussion with Igy, you you seemed content with getting page access token. See my Q/A there:

facebook: permanent Page Access Token?

Lookup Graph API for /{pageId}?fields=access_token, using User Access Token that has manage_pages rights. The resulting Page Access Token should be permanent.

MaxVW

moving to Oauth 2.1 it is actually MUCH simpler - use your App ID + App Secret as access token you can then access the feed (etc) via https://graph.facebook.com/v2.1/theO2/feed?access_token=app_id|app_secret

(from Facebook documentation on Access Tokens)

There is another method to make calls to the Graph API that doesn't require using a generated app token. You can just pass your app id and app secret as the access_token parameter when you make a call:

http://graph.facebook.com/endpoint?key=value&access_token=app_id|app_secret The choice to use a generated access token vs. this method depends on where you hide your app secret.

Shouldn't you be able to use the Page access token for the Facebook page itself? have one of the admins grant your app manage_pages permission, and then use the page access token to retrieve the photos from the page - the page access token won't expire if retrieved via the server side oauth process

There's a detailed guide to logging in as a page in the developer documentation -

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!