Do Facebook Oauth 2.0 Access Tokens Expire?

后端 未结 13 1194
Happy的楠姐
Happy的楠姐 2020-11-27 09:32

I am playing around with the Oauth 2.0 authorization in Facebook and was wondering if the access tokens Facebook passes out ever expire. If so, is there a way to request a l

13条回答
  •  误落风尘
    2020-11-27 10:15

    Basic the facebook token expires about in a hour. But you can using 'exchange' token to get a long-lived token https://developers.facebook.com/docs/facebook-login/access-tokens

    GET /oauth/access_token?  
        grant_type=fb_exchange_token&           
        client_id={app-id}&
        client_secret={app-secret}&
        fb_exchange_token={short-lived-token} 
    

提交回复
热议问题