1

I've integrated facebook with my app using facebooker2 and Mogli. Now offline_access is removed from the facebook. I'm able to get token but its getting expire in 2 hrs, also If user get logged out from facebook, Its also get expired.

I wanted to renew the tokens but I can not do that by following code

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 

As I could not get when user get logged out from the user. If any how I can know when user get logged out from Facebook , still I can not exchange the tocken as its already get expired. and access_token only works before the expiration of a token.

Any Idea, if I have 60 days expiration token or renew the token before get expired.

Thanks in advance for any help you are able to provide.

Neelesh
  • 1,458
  • 2
  • 13
  • 20
  • I know you might have gone through this .. but please see this link too. BBut it is using ominiauth..http://stackoverflow.com/questions/7628952/omniauth-facebook-expired-token-error – Manish Shrivastava Feb 15 '13 at 08:04
  • Or http://stackoverflow.com/questions/10249778/facebook-token-expiration-and-renewal-with-koala-and-omniauth-facebook – Manish Shrivastava Feb 15 '13 at 08:08
  • Or http://stackoverflow.com/questions/2687770/do-facebook-oauth-2-0-access-tokens-expire – Manish Shrivastava Feb 15 '13 at 08:11
  • My previous comment was wrong. I guess you have already read [this](https://developers.facebook.com/docs/howtos/login/extending-tokens/) which also says that the long access token might be the same with the short one but you should not rely on that. Does your application request a new token right after login? What does the above query return? – kon psych Feb 28 '13 at 12:23
  • Sorry @kon, I didn't get chance to reply, I have fixed the issue by exchange_token API :) By then way thank you.. – Neelesh Mar 07 '13 at 15:11

0 Answers0