Facebook user ID. Which one?

梦想与她 提交于 2019-12-13 09:47:23

问题


I'm very confused... I try to setup a a fql fan page query, and in my search, I found that my user have several ID... So which should I use ?

Maybe more explaination is needed ^^

  • The first userId that I found is 4101606156331 (https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=me%3Ffields%3Did%2Cname&version=v2.0)
  • The second one is 1768286839 (https://graph.facebook.com/chapit.nicolas)

Which is the correct one ? And Why there are two IDs ? (maybe more...)

Someone can confirm me that which is the right ID (260226614127613 or 320233158126958) is the right one for the page CodeRougeAuto ? Because I like this page but when I try to know if I like the page with fql in Graph explorer tool (with a active token) I got this :

SELECT uid 
FROM page_fan 
WHERE uid=UID AND page_id=PAGEID
  • 4101606156331 and 260226614127613 : empty response
  • 4101606156331 and 320233158126958 : empty response
  • 1768286839 and 260226614127613 : Error The global ID 1768286839 is not allowed. Please use the application specific ID instead
  • 1768286839 and 320233158126958 : Error The global ID 1768286839 is not allowed. Please use the application specific ID instead

Thank you for your precious help !


回答1:


What you see are the so-called global and app-scoped user_ids. If you're using v1.0 of the Graph API, the user_ids will be global. If you use v2.0 they will be app-scoped, as in your first example.

It's all in the docs: https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids



来源:https://stackoverflow.com/questions/24655270/facebook-user-id-which-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!