得到“真实"的来自Facebook Graph API/用户的个人资料URL [英] Get "real" profile URL from Facebook Graph API /user

查看:88
本文介绍了得到“真实"的来自Facebook Graph API/用户的个人资料URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

API文档中所述, c0>,link字段包含用户的配置文件URL.但是,该网址通常会重定向到其他网址(即显示在Google搜索结果中的网址).

As stated in the API docs for /user, the link field contains the user's profile URL. However, this URL commonly redirects to a different URL (i.e. the one that shows up in Google results).

是否可以通过Facebook API确定给定配置文件的最终重定向位置(真实" URL)?

Is there any way to determine the final redirect location (the "real" URL) of a given profile via the Facebook API?

例如,给定:

"link":"https://www.facebook.com/1091552020"

我想从API中检索https://www.facebook.com/sbhutiani

推荐答案

您再也无法获得用户的真实ID或用户名,因此无法获取真实URL".详细信息: https://developers.facebook.com/docs/apps/changelog

You can´t get the real ID or the username of users anymore, so there is no way to get the "real URL". More information: https://developers.facebook.com/docs/apps/changelog

您可以通过以下API调用获得指向用户配置文件的链接:/me?fields=link

You can get a link to the user profile with the following API call though: /me?fields=link

在Facebook文档中查看应用范围ID".

Check out "App Scoped IDs" in the Facebook docs.

更新:似乎不再可能链接到用户个人资料:

Update: It seems that linking to the user profile is not possible anymore: https://developers.facebook.com/blog/post/2018/04/19/facebook-login-changes-address-abuse/

这篇关于得到“真实"的来自Facebook Graph API/用户的个人资料URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆