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

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

问题描述

API 文档中所述,/userlink 字段包含用户的个人资料 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

I want to retrieve https://www.facebook.com/sbhutiani from the API

推荐答案

无法再获取用户的真实 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.

更新:似乎不再可能链接到用户个人资料:https://developers.facebook.com/blog/post/2018/04/19/facebook-login-changes-address-abuse/

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/user 的个人资料 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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