[英]api to get uid from profile URL on facebook
有没有办法(使用API)从Facebook的个人资料网址获取用户uid ?
The REST api has been deprecated. REST api已被弃用。
The proper way to do this is to pass the profile name to the graph api 执行此操作的正确方法是将配置文件名称传递给图形API
see: Facebook ID from URL 请参阅: URL中的Facebook ID
您可以直接调用图表: https : //graph.facebook.com/username其中username是您要查找的用户名。
As of today(28th July 2015), I found a different way to find Facebook user's numeric id from profile url (or username). 截至今天(2015年7月28日),我发现了一种从个人资料网址(或用户名)中查找Facebook用户的数字ID的不同方式。
As you all will be knowing the profile url syntax is https://www.facebook.com/[username] 大家都知道个人资料网址的语法是https://www.facebook.com/ [username]
So just browse to profile url, right click to view source and search for string "uid": . 所以只需浏览配置文件网址,右键单击查看源代码并搜索字符串“uid”:. You will get numeric id next to it. 您将在其旁边获得数字ID。
Use Users.getInfo , which returns an array of user info, such as first_name
, last_name
, and uid
. 使用Users.getInfo ,它返回用户信息数组,例如first_name
, last_name
和uid
。 Use this call to get user data that you intend to display to other users (of your application, for example). 使用此调用可以获取您要显示给其他用户(例如,您的应用程序)的用户数据。 If you need some basic information about a user for analytics purposes, call users.getStandardInfo instead. 如果您需要有关用户的一些基本信息以进行分析,请调用users.getStandardInfo 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.