permanent user access token

My company has a corporate facebook account where they post event pics in different albums. My requirement is to get all the photos from facebook albums and show in our corporate website. I am able to fetch the photos but the user access token is valid only for 60 days which means every other two months i will have to login into company's corporate facebook account, regenerate the token and update the token in my application.

Is there any way to generate to permanent access token? or is ther any way to regenerate the token at my application level ( without showing login dialog box)?

Is there any other way to fetch the photos without creating app?


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.


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 -

链接地址: http://www.djcxy.com/p/69310.html

上一篇: 如何让浏览器gunzip获取一个Ajax获取的gziped文本文件?

下一篇: 永久用户访问令牌