Facebook - fb graph api js sdk giving wrong response for user-id
Asked Answered
T

1

6

I'm using facebook graph api using javascript sdk. I'm fetching page feed with their likes count and user and same for comment. but after some time I'm getting wrong user_id for all the page post like and comments.

when I'm trying to get this using facebook graph explorer it is giving me right result. I've used app_access_token and user-access-token.. what is wrong with facebook graph api.

Twilley answered 26/5, 2014 at 18:38 Comment(5)
What do you mean with wrong user_id? Could it be that you get an app scoped user id back?Atli
I mean first few character of user_id are same but other are different. I have cross checked this using the name variable in the response JSON. names are same but user_id are different.Twilley
Sounds like a app scoped user id to me. But you can always report it as a bug on developers.facebook.com/bugs and someone will look into itAtli
can you explain me what is app scoped user id??Twilley
Facebooks upgrade guide explains it: developers.facebook.com/docs/apps/…Atli
I
2

You are probably talking about "App Scoped IDs": https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids

Apps don´t return real User IDs anymore, only IDs bound to one specific App. The Graph API Explorer should return the exact same ID for a User, as long as you select the same App before making an API call.

Imbrue answered 3/7, 2019 at 7:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.