tinder-php-sdk icon indicating copy to clipboard operation
tinder-php-sdk copied to clipboard

Refresh access token

Open NetoBraghetto opened this issue 9 years ago • 3 comments

How do i refresh the Facebook access-token in order to communicate to the Tinder SDK?

NetoBraghetto avatar Feb 09 '17 00:02 NetoBraghetto

I'm not sure, normally you would just redirect to the Facebook authentication dialog - and as we don't know the redirect-uri, I don't think we can request a long-lived access_token.

You could try asking for the offline_access permission and see if that gives you a token that doesn't expire:

https://developers.facebook.com/docs/roadmap/completed-changes/offline-access-removal

Then you should be able to call:

https://graph.facebook.com/oauth/access_token?
client_id=APP_ID&
client_secret=APP_SECRET&
grant_type=fb_exchange_token&
fb_exchange_token=EXISTING_ACCESS_TOKEN 

to refresh your token periodically.

skipperbent avatar Feb 09 '17 08:02 skipperbent

we dont have the client_secret also =(

NetoBraghetto avatar Feb 11 '17 16:02 NetoBraghetto

We can Use 'api_token' token instead of access-token. access-token lives 2 hours & api_token lives 24 hours.

joykalyanguru avatar Nov 23 '17 18:11 joykalyanguru