开发者

FQL not returning all my friends

开发者 https://www.devze.com 2023-02-15 09:11 出处:网络
I\'m trying to write a query that will return with the uid\'s of all my friends. My query so far is: \"SELECT name FROM user WHERE uid IN (SELECT uid FROM friendlist_member WHERE flid in (SELECT flid

I'm trying to write a query that will return with the uid's of all my friends. My query so far is:

"SELECT name FROM user WHERE uid IN (SELECT uid FROM friendlist_member WHERE flid in (SELECT flid FROM friendlist WHERE owner = me()))"

It returns a fifth of my actual friends (about 30 males and females each). I tried playing around with limit, but that didn't do anything (I had great luck in getting all my wall posts that way, but unfortunately it didn't work here). I've tried breaking it down as well, so I first get all the friendlists I have, then all the uid's and then all the names. But when I did this, I actually got less, and I also got duplicates! :S

So does anyone have any experience with this or any suggestions? I'm really hoping that I can return all my friends. But I was also wondering, perhaps it has to do with my friends privacy settings. I noticed this was a problem for retrieving photos, but they don't seem to be the same friends...

Looking at the results again, I'm starting to think开发者_Go百科 that the friends it's not returning are the ones that get set in the default friendlist "Other Friends". All these friends that are returned are in customized friendlists I had made.

I'm using FacebookSDK C#, and it's on a Windows Form


I think you might be querying the wrong table. The table you are querying will return friends which are members of a specific list. I think what you need to do is query the 'friend' table instead.

Ref to the page about this table on the Facebook dev site: http://developers.facebook.com/docs/reference/fql/friend/

You should change the subquery to something like:

SELECT uid1 FROM friend WHERE uid2=me()
0

精彩评论

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