简体   繁体   English

如何在没有Facebook应用程序的情况下获取Facebook用户ID或名称

[英]How to get facebook user ID or name without Facebook Application

I'm working on web app which is NOT a Facebook Application. 我正在使用不是Facebook应用程序的Web应用程序。 I want to get current logged user's ID (I'm not sure if this is the right expression, I mean facebook.com/ userid ) or user's name using Javascript. 我想使用Javascript获取当前登录的用户ID(我不确定这是否是正确的表达式,我的意思是facebook.com/ userid )或用户名。
Please if you don't know how to do it or if you don't have any suggestion what should help me, don't comment , thanks. 如果您不知道该怎么做,或者您没有任何建议对我有什么帮助, 请不要发表评论 ,谢谢。

How can I do this? 我怎样才能做到这一点?

You cannot get the details (facebook id etc.) of the currently logged-in facebook user without using an app. 如果不使用应用程序, 则无法获取当前登录的Facebook用户的详细信息(facebook ID等)。

To query for the current user, you'll have to query for the /me and that requires an active access token which you can only get when the user authorizes an app! 要查询当前用户,您必须查询/me ,并且需要一个有效的访问令牌,该令牌只有在用户授权应用程序后才能获得!

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

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