使用facebook graph API v3.2从其他user_id获取数据

问题描述 投票:1回答:1

我想知道是否有可能在Facebook上获得具有公开资料的用户的基本数据(姓名,帖子......)(显然)。

我尝试使用GRAPH API这个调用:

https://graph.facebook.com/v3.2/USER_ID?fields=id,name&access_token=access_token

当我使用我的个人资料USER_ID时,它会返回我的ID和我的名字,但是当我输入另一个用户ID时,它会返回以下错误:

Unsupported get request. Object with ID 'USER_ID' 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

但是我依赖文档,变量user_id可以在这个API调用中使用,所以我认为这是可行的(可能没有)。

我在其他帖子中说,过去你可以通过用户名访问,但现在没有。也许,您只能访问您的个人资料数据?

谢谢,抱歉我的英语。

facebook facebook-graph-api userid
1个回答
1
投票

不,您无法通过API访问任何人的个人资料数据,即使它是在网站或官方应用上公开显示的。

用户需要明确登录您的应用并授予其访问其数据的权限。这些权限不能代表其他人授予 - 您希望获得任何信息的每个用户都必须亲自执行此操作。

© www.soinside.com 2019 - 2024. All rights reserved.