Facebook FQL limited friends issue - facebook

I am using facebook FQL to get the friends list
I am using this query
"select uid, name, pic_square, is_app_user from user where uid in (select uid2 from friend where uid1 = me())";SELECT uid, name, is_app_user, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1"
Its working fine but it returns me only few friends like 15 to 20
I need all my friends in responce
Any idae?
Thanks

I guess you're using v2.0 of the Graph API. Therefore, you only get the friends which also use the app of which the requesting user access token was issued
See https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
If your app was set up before April 30th 2014, you can specify that you explicitly want to use v1.0, which will give you all friends. This will only work until April 30th, 2015. If the app was created later, there's no possibility to get all friends.

Related

FQL: Select date of the last post of all friends

I'm trying to query the date of the last wallpost for each of my friends using FQL.
I've tried something like this:
SELECT post_id, created_time FROM stream WHERE source_id IN (SELECT uid2 FROM friend WHERE uid1 = me())
However, this does not provide me with the output I am looking for. Furthermore I wonder how to set the LIMIT?
Thank you for your help!
If you have an v1.0 app, you could use
SELECT post_id, created_time FROM stream WHERE source_id IN (SELECT uid2 FROM friend WHERE uid1 = me()) order by created_time desc limit 1
If you have a v2.0 app, you'll only see the posts of the friend which are using the same app. If you're using >v2.0 then you have no chance to use FQL. In general, FQL will be deprecated on August 7th, 2016.
You canĀ“t get the posts of friends anymore, for privacy reasons. Friend permissions are gone: https://developers.facebook.com/docs/apps/changelog
You may want to stop using FQL too, because:
The FQL and REST APIs are no longer available in v2.1

FQL is_app_user is not working anymore

I have a few Facebook apps, and I use the following FQL to get the list of app users:
SELECT uid,name FROM user WHERE uid IN(SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1
and it works fine, but now I created a new app, and the above FQL always returns empty and I know for a fact that I have friends using the APP,
Any ideas?
The problem was solved by adding "user_friends" to the list of requested permissions, I didn't need this permission in Graph API V1.0

Getting friends using the same application on Facebook

I'm using play framework to create a facebook application. I'm kinda stucked at some point. With Graph Api i can't take a list of friends who use my application. What i want to say is for example:
A is using my application.
B is using my application too and B is a friend of A.
When A is using my application, I want A to see B is also using this application.
Simply I want to get list of friends using same application.
How would i do that with Graph Api?
There is a field called "is_app_user" on the user table that you could run a FQL query against. The query would be something like:
select uid, name
from user
where is_app_user = 1
and uid in (SELECT uid2 FROM friend WHERE uid1 = me())
The graph url for that would be like this (remember to add an access token):
https://api.facebook.com/method/fql.query?query=select uid, name from user where is_app_user = 1 and uid in (SELECT uid2 FROM friend WHERE uid1 = me())&access_token=...
With Friend A's access token do a Post to me/friends to get the list of friends. See if Friend B is on the list. See: http://developers.facebook.com/docs/reference/api/user/

facebook fql query to retrieve friends posted items

Is there any fql statements allowed by facebook that helps to fetch contents of this page through an application interface: http://www.facebook.com/posted.php I know the links table returns the posted item for a logged in user (http://developers.facebook.com/docs/reference/fql/links). I need the same but for the logged-in user's friends.
Thanks.
you can use Fql query or Graph API to get your friends data.
Sometimes you will not get all information from the graph like birthdate of your friends but yes you can use fql queries to solve your probs.
here is an exmple for you.
create first facbook object and the use it.
$query = "SELECT uid, first_name, last_name, birthday_date, sex, pic_square, current_location, hometown_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND birthday_date != 0 ORDER BY birthday_date";
Regards,
Archit.
You can do this through an FQL query - though you may need to use multiple queries if you require more information about the friend who posted the link:
select title, owner from link where owner in (select uid2 from friend where uid1 = me() limit 100)
You may want to limit the number of friends (or even the links themselves) as this can be a costly query

FQL facebook query language: how can i query the list of friends of a specific user that has my application installed?

When a user logs in to my facebook application, i want to show him a list of all of his friends that has my application installed.
can I use FQL to query who's of his friends have my application installed? and if so how ?
thanks!
Actually, you can do pull list of friends who installed an app through FQL.
SELECT uid, name, pic_square FROM user WHERE is_app_user AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
You can do it like this also, if is_app_user=1 then its app user.
NSString *query =
#"SELECT uid, name, pic_square,is_app_user FROM user WHERE uid IN "
#"(SELECT uid2 FROM friend WHERE uid1 = me() LIMIT 25)";