Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Access Token Without Login | Facebook`

I am creating a web app and I need to make a call like this one: https://graph.facebook.com/639339682906611?access_token={my_access_token_here}

When I obtain an access_token through the Graph API Explorer, it works fine. But after a while (some days I think) the token expires and I have to go to manually go to the Graph API Explorer again to renew it.

The web app requires no login for the users.

Is there a way to update my access_token automatically? If not, is there a way to make my access_token last longer?

like image 703
padawanTony Avatar asked Feb 05 '23 19:02

padawanTony


1 Answers

No, there is no way. You can only extend User or Page Tokens. Extended User Tokens are valid for 60 days, Extended Page Tokens are valid forever.

You can also try using an App Token, it is just a combination of App ID and App Secret. It is the only Token you don´t need authorization for: access_token=app_id|app_secret

More information:

  • https://developers.facebook.com/docs/facebook-login/access-tokens
  • http://www.devils-heaven.com/facebook-access-tokens/
like image 80
andyrandy Avatar answered Feb 09 '23 00:02

andyrandy