-1

例如,我想运行这个图形 api 查询:

/userA/mutualfriends/userB&access_token=what do I put here?

上面的查询应该给我 userA 和 userB 的共同朋友,那么如何为 userA 和 userB 提供访问令牌?

4

2 回答 2

3

We do not need to have accesses token for both the users.

We just need to have a access_token to the userA's friends. by doing that u have access to the mutual friends of any friend of userA. Try the Graph Explorer tool where you can get the access token Get Access Token Below is the snapshot of the Select permission from Graph Explorer Page

After clicking on get access token a popup will appear which should look like the below image.

Select user_friends from the popup

Sample Image

now run the your query /userA/mutualfriends/userB&access_token=access_token

于 2013-09-12T13:25:11.667 回答
0

好吧,您不能在任何查询中使用2 个标记。

顺便说一句,您的问题不需要2 个访问令牌!您只需要任何用户的访问令牌。例如:如果您使用 User-A 的访问令牌,查询-

/<user-A>/mutualfriends/<user-B>?access_token=<access_token-of-user-A>

[如果您对如何在 Graph API Explorer 中进行测试感到困惑,只需清除访问令牌字段并显式编写&access_token=]

于 2013-09-12T13:45:30.780 回答