开发者

How to get facebooks friends who are all single using either PHP sdk or FQL?

开发者 https://www.devze.com 2023-03-17 18:03 出处:网络
In my application I\'m trying out to list only the friends who are all single. I tried different methods and it didn\'t return proper values...

In my application I'm trying out to list only the friends who are all single.

I tried different methods and it didn't return proper values...

I tried the graph API but could list only all the friends irrespective of their relationship status.

i tried $facebook->api("/$user/friends?relationship_status='single'");

Also i tried to use FQL and fetch things up but the relationship status always return up as 'null' for even the user who have approved the applications and gave permission to acc开发者_如何学JAVAess their relationship_status..

the fql query i tried is

SELECT 
uid,name, relationship_status, current_location 
FROM user 
WHERE 
uid IN (SELECT uid2 FROM friend WHERE uid1 = 2343434434234)

How can i get this done?


The problem is that you're only asking for that user's relationship status. You need to also ask for the friends_relationships permission. Once you do that, your query will work fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号