Get my UID using FQL
I need to get my UID
using a simple FQL query, for some reason it returns an empty page.
This is开发者_开发知识库 my query:
https://api.facebook.com/method/fql.query?query=SELECT uid FROM user WHERE uid=me()
me()
returns the current connected user. So you need to append an access_token
:
https://api.facebook.com/method/fql.query?query=SELECT uid FROM user WHERE uid=me()&access_token=XXXXXX
P.S.: Facebook has just released a Graph API endpoint to query FQL fql
, so you should be able to do something like:
https://graph.facebook.com/fql?q=SELECT uid FROM user WHERE uid=me()&access_token=XXXXXX
(unfortunately, for some reason it's not working on the Facebook Graph Explorer)
精彩评论