Oddly enough, the docs do not indicate how to get the context identifier, but I managed to get it by digging a bit.
Here's how you could do to get the data all_mutual_friends:
GET /{user-id}?fields=context.fields%28all_mutual_friends%29&access_token={other-user-access-token}
Then the response will indicate the context identifier.
{
"context": {
"all_mutual_friends": {
"data": [
{
"id": "1381033095543871",
"name": "Dave Amiaaehjighi Putnamwitz",
"token": <user token>,
"picture": {
"data": {
"is_silhouette": true,
"url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpf1/v/t1.0-1/c15.0.50.50/p50x50/10354686_10150004552801856_220367501106153455_n.jpg?oh=82c2ce067f9c7f2c0a66d1efb16730e7&oe=5670F72F&__gda__=1450287355_17925d7381c8da5663c2349483f4b032"
}
}
}
],
"paging": {
"cursors": {
"before": "MTM4MTAzMzA5NTU0Mzg3MQZDZD",
"after": "MTM4MTAzMzA5NTU0Mzg3MQZDZD"
}
},
"summary": {
"total_count": 1
}
},
"id": <Context id>
},
"id": "1375274282788732",
}
This context identifier can then be used to
GET /{user-context-id}/all_mutual_friends/
But this step is pretty useless, since we get the data in the first request.
It would be nice if Facebook updated its documents to reflect reality.
source
share