简体   繁体   English

如何使用access_token(Facebook Graph API)?

[英]How to use access_token (of Facebook Graph API)?

I am trying to get FB user's full name using the access_token.我正在尝试使用 access_token 获取 FB 用户的全名。 I have the access_token with me but I am not sure how I can use it to access user information.我有 access_token,但我不确定如何使用它来访问用户信息。

I have read the documentation and it says to get more user info we can use: https://graph.facebook.com/userid?access_token= ...我已经阅读了文档,它说要获得更多我们可以使用的用户信息: https://graph.facebook.com/userid?access_token= ...

So, does this mean I need to use cURL to get response from this URL?那么,这是否意味着我需要使用 cURL 从这个 URL 获得响应?

Btw, I am using PHP.顺便说一句,我正在使用 PHP。

Thanks.谢谢。

Accesstoken you can use for getting the information of the user which is necessary. Accesstoken 可用于获取必要的用户信息。 Also if you have asked offline_access permission from user, you can store this accesstoken in your database and can get the user information even if he not logged in with facebook.此外,如果您向用户请求了offline_access 权限,您可以将此访问令牌存储在您的数据库中,即使他没有使用facebook 登录,也可以获取用户信息。 That means, from next time you automtically get the information using this token.这意味着,从下次开始,您将使用此令牌自动获取信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM