I am creating an applications that gets my friend's photos sorted by created date so I use the following FQL to get the photo.
SELECT src_big_width,src_big_height, caption, owner, pid, src_big , src_small ,aid, created FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner IN (SELECT uid2 FROM friend WHERE uid1=me()))
ORDER BY created DESC LIMIT 0,1000
But I my profile I see some friend posting a new photo, but it does not appear in my
profile. Is there any error or mistake in my FQL?
Does your access token have the friends_photos permission? You need this to access the photos of a friend.
Also, check that you can see the photos in the Graph API by using the Graph API explorer to check there is data there which can be accessed via your access_token. This will help to rule out issues with your FQL query.
Related
It's possible to know the facebook friends that they have installed a my fb app?
I have tried some ways directly using the online facebook developer tool but I have not been able to find a solution. I have tried both Graph API and FQL
Using FQL:
SELECT uid, name, is_app_user FROM user
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me())
AND is_app_user=1
I have used a fql for get my friends information
SELECT uid,name,first_name,middle_name,last_name,pic_square,hometown_location,current_location,profile_url,email,website FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
it returning only friends id an name. Who have trusted my app there location also comming but when I am puting this fql on the Graph API Explorer
on facebook then it returns every one's location. Then How Can I get every one's location ?
It is hard to understand your question, though it looks like your app doesn't have all the required user permissions. The Graph API explorer, or the developer page are great resources to figure out which ones you need.
Hometown location,current location, email, and website are not "basic" data.
I want to get friend app user with Graph API I tried to user with me/friends?fields=installed but I got all of my friends. Maybe, I have some wrong in here. Please show me any way to get friend app user with Graph API. I don't know in Facebook SDK 3.0 can I get that list easier?
You can get list of friends whom are user of your app using FQL rather than Graph API as:
SELECT uid FROM user
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
AND is_app_user = 1
I am attempting to pull the current location of all of a user's friends on facebook, and am running into a curious problem wherein some of those friends are reading out NULL when I can see on their actual Facebook pages that it says "Lives in ,." The difficult part of this error is that it only happens on probably ~30% of cases. On the remaining cases, it pulls all of the correct information, which tells me that the permissions are probably set up correctly.
To be specific, the FQL code I am using is:
SELECT uid,
name,
current_location
FROM USER
WHERE uid IN (SELECT uid2
FROM friend
WHERE uid1 = Me())
This same issue has arisen when making javascript requests directly to the graph, so it doesn't appear to be an FQL issue either. Does anyone know why current_location might sometimes fail and report NULL, but not always?
Thank you.
Privacy settings have a higher priority than facebook api's.
If user has restricted particular info from privacy setting, you wont be able to fetch that by facebook api's (graph, fql, rest api) even if user grants permission for that.
e.g.
If I have restricted to share my birthday on privacy setting, no app would be able to grab my birthday even if they ask for it.
Also, user can restrict apps from getting particular info.
e.g. User can allow app xyz to access everything they want but at the same time user can restrict app xyz to access his location
I hope this answers your question.
There are 2 possibilities;
The friends of the user who have current_location null :
1) Did not specify their current location in their facebook profile
2) They specified the current location in their facebook profile but
their privacy setting denies you to see it
I have the same problem.
I've checked two different users which are friends of me.
In both cases FQL query like:
select uid, first_name, name, birthday, birthday_date, current_address, current_location, hometown_location, sex from user where uid in (select uid2 from friend where uid1 = me()
returns null for home_location.
I'd checked both accounts and home location was accessible for all (both privacy and app privacy settings).
My access token included all required permissions (home location was shown for other friends).
Then I run FQL console with query:
select uid, first_name, name, birthday, birthday_date, current_address, current_location, hometown_location, sex from user where uid = nnnn
as owner and the results were:
Owner got home location.
On my old FQL Console browser tab -- still no home location.
On my new FQL console browser tab -- I got home location.
After a while I got home location on old FQL console.
But old queries still didn't return home location...
Seems like some caching problem on FB side.
Same issue here. I can retrieve current_location or hometown_location for NONE of my friends. For most of them I can easily see it by visiting their profile though. App permissions friends_location and friends_hometown are set.
Try this query to get current location of your friends
SELECT first_name,uid, last_name, current_location.name
FROM user
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND current_location
Also u will need friends_location permission to run this query
I am trying to get a list of my friend's friends using the iPhone Facebook SDK.
I've tried an approach using FQL and the Graph API but I get an error in both cases:
"Can't lookup all friends of YYYYYY. Can only lookup for the logged in user (XXXXX), or
friends of the logged in user with the appropriate permission"
I've done some research and see that this functionality wasn't available through the Facebook API up until October 2010. But then radio silence. Well, it's almost 6 months later. So was this ever implemented?
I have requested all permissions I need for my app as well.
This functionality does not exist in the Facebook Social Graph API or the FQL API.
During my quest to find out how to accomplish this I found many developers who asked the same question. Some developers have been asking for this feature for over 2 years. I think the FB team may consider it a privacy of performance concern.
I have worked on it. I was able to see friends of my friend.
It needs following requirements:
Your friend needs to be using application.
Permission from application read_stream, publish_stream, publish_checkins.
Try this fql query.
$query="SELECT uid, name, work_history FROM user
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 IN
( SELECT uid FROM user WHERE uid IN
(SELECT uid2 FROM friend WHERE uid1 = $fb_id ) and is_app_user=1)
)";