问题描述
我们正在开发一个网络应用程序,并通过使用用户名通过FQL获取用户ID。不幸的是,Graph API v2.1不再支持FQL。我没有找到如何引用用户名来查找文档中的用户标识。
we are developing a web app and were getting the user ids by using the username via FQL. Unfortunately, Graph API v2.1 does not support FQL anymore. I haven't found a way how to reference the username to find the user id in the documentation.
有没有解决方案?或者说Graph API不可能。我知道我可以使用该名称查询用户ID,但是使用用户名,在我们的方案中会更好。
Is there a solution? Or is that not possible with the Graph API. I know that I can query the user ID using the name, but with the username, it would be better in our scenario.
推荐答案
This is intentional for privacy reasons. If you would be able to get the (real) User ID with the unique username, there would be no need to invent App Scoped ID at all.
如果您做出调用 / me / username
,它将返回以下错误:
If you make a call to /me/username
, it will return the following error:
Btw,你甚至不能从v2.0开始获取用户名,只有真正的名字。
Btw, you cannot even get the username since v2.0, only the real name.
这篇关于如何通过Facebook Graph API v2.1中的用户名获取用户ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!