Facebook从应用程序选项卡获取用户ID [英] Facebook Get User ID From Application Tab
问题描述
如果他想要,Facebook应用程序可以有一个用户可以添加到他的个人资料标签页的标签。
如何获取UID或以其他方式标识当前登录用户为了自定义他的布局?
谢谢。
如此处所示:
当Facebook首次访问您的标签页时,Facebook不会传回观看用户是谁。 Facebook确实在fb_sig_profile_user参数中发送个人资料所有者的身份证明,因此您知道要显示内容的个人资料。
用户与您的标签交互后的请求参数。我找不到精确的参数名称,因为它们删除了一个维基页面,该页面用于包含所有已传递参数的列表,但如果转储所有请求变量,则应该可以看到它(但不能在第一次访问期间)。 / p>
Facebook apps are allowed to have a tab that a user can add to his profile's tabs if he wants.
How can I get the uid or otherwise identify the currently logged in user in order to customize the layout for him please?
Thank you.
As noted here:
Facebook does not pass back who the viewing user is when she first visits your tab. Facebook does send the profile owner's ID in the fb_sig_profile_user parameter, so you know whose profile to display content for.
Visitor id is passed as request parameter after a user interacts with your tab. I can't find exact parameter name as they removed a wiki page that used to contain a list of all passed parameters, but if you dump all your request vars you should be able to see it (but not during the first visit).
这篇关于Facebook从应用程序选项卡获取用户ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!