简体   繁体   English

从 Facebook 的 Graph API 获取用户个人资料链接

[英]Get user profile link from Facebook's Graph API

I have an app-scoped user id (ASUID) for a Facebook user and I wish to obtain a link to that user's profile page.我有一个 Facebook 用户的应用范围用户 ID (ASUID),我希望获得指向该用户个人资料页面的链接。

A post on Facebook's Developer blog dated May 1, 2018 states that this link is accessible as of Graph API v3.0 through the link field on a user object. Facebook 开发者博客上的一篇日期为 2018 年 5 月 1 日的帖子指出,从 Graph API v3.0 开始,可以通过用户对象上的link字段访问此链接。 Access to this field requires the user_link permission be approved for the app and granted by the app user.访问此字段需要为应用程序批准user_link权限并由应用程序用户授予。

I have attempted to access this field with a user access token associated with my test app and I have verified the access token has the user_link permission granted via the Access Token Debugger .我尝试使用与我的测试应用程序关联的用户访问令牌访问此字段,并且我已验证该访问令牌具有通过Access Token Debugger授予的user_link权限。 However, the link is not included in the response.但是,该链接未包含在响应中。

Request:要求:

https://graph.facebook.com/v3.0/[ASUID]?fields=link&access_token=[ACCESS_TOKEN_W_USER_LINK_PERMISSION]

Response:回复:

{ "id": "[ASUID]" }

Is there any indication as to why this is not working?是否有任何迹象表明为什么这不起作用?

如文档所述, user_link权限需要通过App Review才能用于实时应用。

在撰写此答案时,无法使用 Facebook API 获取用户个人资料页面。

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

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