简体   繁体   中英

IOS app cannot get Facebook uid by calling me() in FQL

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?

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

Indeed it does require permission. You need to have the user authorize your app before the /me endpoint will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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