Why does FQL return different user IDs to Graph AP

2019-04-13 08:40发布

问题:

I want to see which users can see a particular album. I use the following query to get my albums and their privacy settings:

SELECT id,allow,deny,description,friends,value FROM privacy WHERE id IN
(SELECT object_id FROM album WHERE owner=me())

and it returns something like this for each album:

{
  "id": 212102865605678, 
  "allow": "211824028961234,212367312342178", 
  "deny": null, 
  "description": "John Doe, Work People", 
  "friends": "SOME_FRIENDS", 
  "value": "CUSTOM"
} 

The second ID in the allow column is right. That's the ID for the 'Work People' friendlist.

But the other ID isn't really the ID of 'John Doe'.

If I use the FB.api from javascript using 'me/friends' I get this:

{
  "name": "John Doe", 
  "id": "100005318169867"
}

Same name, but different ID. I'm quite certain that they're the same user (I don't have many friends). Is this the difference between some internal database ID and external ID?

Any help would be greatly appreciated!