如何使用相同的应用程序找到Facebook的朋友 [英] How to find Facebook Friends using the same app

查看:95
本文介绍了如何使用相同的应用程序找到Facebook的朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个应用程序,并希望使用该应用的人在Facebook上使用相同的应用查找朋友。任何帮助,这将是巨大的。

I am creating an app and would like people using the app to find friends using the same app on Facebook. Any help on this would be great.

我知道这可以做到。我已经在Instagram和Tiger Woods 12看到了。

I know this can be done. I have seen it on Instagram and Tiger Woods 12.

推荐答案

一旦您授权用户并获得访问令牌,您就可以可以快速确定哪些朋友已经授权您的应用程序,并致电 / me / friends?fields = installed

Once you've authorised the user and obtained an access token, you can quickly determine which of their friends have already authorised your app with a call to /me/friends?fields=installed

对于已经授权该应用的用户的朋友,结果将如下所示:

For the users' friends who have already authorised the app, the result will look like this:

{
   "installed": true, 
   "id": "{USER_ID_GOES_HERE}"
}, 

而对于尚未授权该应用的用户,结果将如下所示:

and for the users who have not already authorised the app, the result will look like this:

{
  "id": "{USER_ID_GOES_HERE}"
}, 

在iOS SDK中执行此操作,您将看不到确切的返回值,但SDK应将结果放入可以使用的数据结构中,并检查是否存在已安装项目

If you're doing this in the iOS SDK you won't see that exact return value, but the SDK should put the results into a data structure you can use, and check for the presence of the 'installed' item

您也可以要求添加用户对象字段,而不仅仅是安装,但这只是一个快速例如,向您展示如何获取使用该应用的朋友列表

You can also request additional User object fields other than just 'installed', but this is just a quick example to show you how to get the list of friends that use the app

这篇关于如何使用相同的应用程序找到Facebook的朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆