HI,

Could you pls find any other solution for handle this token problem? With this upgrade you can use access token to reach your facebook albums but its work for only one hour. It would be greatful if you find solution for this.

Thank you very much

remarK

Comments

Seppe Magiels’s picture

Status: Active » Fixed

Hi,

You have to extend the access token. How to do that can be found here. The long-lived token will be valid for 60 days. but access tokens for pages should not expire (if you're the admin!) according to:

To get a longer-lived Page access token, exchange the User access token for a long-lived one, as above, and then request the Page token. The resulting Page access token will not have any expiry time.
Source: https://developers.facebook.com/docs/facebook-login/access-tokens/

By using a long-lived user access token, querying the [User ID]/accounts endpoint will now provide page access tokens that do not expire for pages that a user manages. This will also apply when querying with a non-expiring user access token obtained through the deprecated offline_access permission.
Source: https://developers.facebook.com/roadmap/offline-access-removal/

More information about the access tokens can be found here.

remarK’s picture

Thank you for your fast reply, but i have some questions. Iam really new in this case.... Could you pls help me how can i do this.

I see links which have specify places:

https://graph.facebook.com/oauth/access_token?client_id=_APP_ID_&client_...

in this link do i need to replace _APP_ID_ with something? And also i dont know where can i found that.
And what about of SECRET_ID? Also donno where can i find that.

Sorry for these questions but i need to solve this problem for my website in these days.

Thanks in advance

remarK

Seppe Magiels’s picture

Component: Code » Miscellaneous
Category: bug » support

Ok this is what you do:

  1. Go to https://developers.facebook.com/apps and create an app for your page. Once you're on the summary page of your app you will find your app id and app secret.
  2. Create a page, if you don't have one yet. Remember you need to be admin of th page!! (Go to app details and create page)
  3. Associate the application to the Page
    1. Go to your Facebook Page and click "Edit Page" section
    2. In the Basic Information tab, set Category as "Brands & Products" -> "App Page".
      Make sure the Page name is the same as the App name
    3. Go to your Facebook App "Edit App" page, and now you will be able to choose the Page as the App page.
  4. Follow step 4-7 of the answer on http://stackoverflow.com/questions/10183625/extending-facebook-page-acce...

Hope this helps! ;)

remarK’s picture

Status: Fixed » Closed (fixed)

I am really grateful that you help me in this case. Thanks a lot! It was much easier to understand in your aspect.
I could make all the steps you gave me and now i have two months long token access. :)

remarK