我想使用Graph API来获取任何用户ID,我需要发送给Facebook api什么?

我想使用Graph API来获取任何用户ID,我需要发送什么信息到Facebook api?

https://graph.facebook.com/100009031494361?access_token= ....

{
 "error": {
      "message": "Unsupported get request. Object with ID '100009031494361' does 
       not exist,cannot be loaded due to missing permissions,or does not support this operation. Please read the Graph API documentation 
       at https://developers.facebook.com/docs/graph-api","type": "GraphMethodException","code": 100,"error_subcode": 33,"fbtrace_id": "AT-imffjNk6PZJGyIE4m6kG"

    }
}
oji6695 回答:我想使用Graph API来获取任何用户ID,我需要发送给Facebook api什么?

为了获取用户ID,您可以使用/me endpoint

/me
     

/ me节点是一个特殊的端点,它转换为以下内容的user_id   访问令牌为的人(或Facebook页面的page_id)   当前用于进行API调用

以curl为例:

curl -i -X GET \
 "https://graph.facebook.com/v4.0/me?fields=id,name&access_token=<the_token>"

希望获得帮助

本文链接:https://www.f2er.com/3161252.html

大家都在问