开发者

Get my UID using FQL

开发者 https://www.devze.com 2023-04-13 09:55 出处:网络
I need to get my UID using a simple FQL query, for some reason it returns an empty page. This is开发者_开发知识库 my query:

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号