得到朋友列表,知道他们是否安装了我的应用程序 [英] getting the list of friends and to know if they have my app installed or not

查看:162
本文介绍了得到朋友列表,知道他们是否安装了我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse FDT在Facebook页面上为Facebook编写一个Flex应用程序。
我想要获取该用户的朋友列表,并区分安装了应用的朋友和没有的应用的朋友。

I'm using Eclipse FDT to write a Flex application for facebook on a facebook page. I want to be able to fetch the friends list of that same user and to distinguish between friends who installed the app and friends who didn't.

我在stackoverflow上搜索,我看到用户使用旧的REST API做到这一点,问题是可以用graph api吗?

I searched on stackoverflow and I saw that users did that using the old REST API, the question is can I do that with graph api ?

如果不可能使用图形API所有...所以如何做REST API? :)

if it's not possible using graph api at all... so how to do with REST API ?! :)

具有以下要求:

https://graph.facebook.com/me/friends?access_token?XXX

我可以获取朋友列表那个用户。但是如果安装了我的应用程序,它不会提供标志。我可以做些什么和怎么做?

I can fetch the list of friends of that user. but it doesn't provide a flag if my app is installed. what can I do exactly and how ?!

谢谢!

推荐答案

您有两种方法可以使用图形API和fql。

You have two ways to do it, with the graph api and with fql.

使用图表api ,您可以发出以下请求: / me / friends?fields = installed 哪些应该返回一个用户列表,这个表单:

Using the graph api you can make a request to: /me/friends?fields=installed which should return a list of users, the ones that have the app installed will have this form:

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

没有应用程序的人将是以下形式: p>

The ones who don't have the app will be of this form:

{
    "id": "USER_ID"
}

使用 FQL 使用此查询

SELECT 
    uid
FROM 
    user 
WHERE 
    is_app_user 
    AND 
    uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

这篇关于得到朋友列表,知道他们是否安装了我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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