开发者

What is access token in facebook API?

开发者 https://www.devze.com 2023-04-06 14:39 出处:网络
What is access token in Facebo开发者_Go百科ok API? why I need it ? What is its purpose ? Do I need to store it persistently in my website ?
  1. What is access token in Facebo开发者_Go百科ok API?
  2. why I need it ?
  3. What is its purpose ?
  4. Do I need to store it persistently in my website ?


For almost every request you make to facebook API you need to pass access token along to get the results. This token may expire depending on what kind it is, you might need to persist it in case your application need to access facebook API when user is offline.

PS: Access token comes from user's request to your application.


Facebook implementation of the OAuth 2.0 involves three different steps: user authentication, app authorization and app authentication. User authentication ensures that the user is who they say they are. App authorization ensures that the user knows exactly what data and capabilities they are providing to your app. App authentication ensures that the user is giving their information to your app and not someone else. Once these steps are complete, your app is issued an user access token that you enables you to access the user's information and take actions on their behalf.

access token will be expired unless the user has granted to your app the "offline_access" permission. In other word, unless you have such a perm granted, you don't need to store it persistently in your website.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号