IOS应用程序无法通过在FQL中调用me()来获取Facebook uid
我正在为 IOS 编写一个程序,想要获取当前用户的 uid 和名称。我尝试了 me(),但它不返回任何值:
SELECT uid, name FROM user WHERE uid = me()
但是,当 uid 已知时它可以工作,例如:
SELECT uid, name FROM user WHERE uid = 4
Does me() 需要权限吗?
I'm writing a program for IOS and want to get uid and name of the current user. I tried me(), but it does not return any value:
SELECT uid, name FROM user WHERE uid = me()
However it works when the uid is known, for example:
SELECT uid, name FROM user WHERE uid = 4
Does me() require permission?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“me()”快捷方式应该适用于您使用用户访问令牌进行的任何 FQL 查询
如果这不起作用,您可能实际上并未使用登录用户进行操作 - 许多 API 调用在没有用户登录的情况下仍然可以工作
The 'me()' shortcut should work in any FQL query you make with a user's access token
If this isn't working you may not actually be operating with a logged-in user - many API calls will still work without a user login
事实上,它确实需要许可。您需要让用户授权您的应用程序,然后 /me 端点才能工作。
Indeed it does require permission. You need to have the user authorize your app before the /me endpoint will work.