Facebook FQL Query for `is_minor` field -- special permission required? - facebook

I'm using a FQL query to access the Facebook User table and I'm trying to access the is_minor column.
I know I'm submitting the FQL query properly, because all the other information I'm requesting in the query, including Birthday, is being properly returned. However, the response for is_minor is always blank. I've tested this with several users who I know for certain are minors (under 18 years old), but the field is still blank in my FQL response.
Is there a special permission that is needed in order to access this column in the FQL table?? Any one know why I'm not seeing any data for this field in the FQL response?
(I want to access this field because I want to prevent my app from processing certain actions with Users, or Friends of Users, who are minors. In many cases the User or Friend may not have made their Birthday available through the API, so I may not be able to calculate their age myself. I just want to know if they're 18 or older.)

Related

How to get my all facebook posts by group ID

As the fql is deprecated for versions v2.1 and higher, So I am not able to access the data using fql. Is there any way to fetch only my posts by group id.
Please correct me, if Im wrong.
You can get all posts of a group via the GraphAPI endpoint
v2.5/{group-id}/feed
Anyways, you are not able to perform this action if you are not "Admin" of the specific group. You need the additional permission of 'user_managed_groups'.
To drill it down to a specific user query against
v2.5/{group-id}/feed?fields=from,message
Then you have have the users' id and the message. Just iterate of the response and filter out by the user of your choice.

Which user's data can I access through fql?

Okay, total noob question:
I want to understand what FQL can do, so I know if it can be useful to me before I try to learn it. From browsing Facebook's documentation I could not understand the following:
With FQL, can I search among ALL registered users for e.g. users of a certain age and gender from a certain region? Or can I only search among my friends?
Please provide a quote from and a link to official or otherwise reliable documentation along with your "yes" or "no".
Thank you!
The Facebook API only returns things that are visible to the owner of the access_token when making a query. FQL has the added requirement that the first field in your WHERE portion of the query must be indexable. These are marked with a ★ in the documentation.
For your example of querying the user table, your query must have one of the following immediately after WHERE: uid IN, username IN, name IN or third_party_id IN. The easiest way to get a list of these is by passing a subquery to get the current user's friends via WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()). There are some other, more complex ways to get at a list of ids.
As for your app, it's going to be very hard to search for this reliably. The user's age, gender and location are up to the user to populate. The user can choose not to populate these, or keep them private. If these items are private, keep in mind that this filtering takes place after your query completes, so it is possible that all results returned by your query will be filtered out.

Some facebook friends' birthdays returning as null but I have the correct API permissions

I'm tring to get my friends' birthdays in my app and some of them are null. I thought that those people don't have a birthday set, but they actually do.
My fql query is:
SELECT uid,name,birthday_date FROM user WHERE uid IN (SELECT uid2 from friend where uid1=me())
The birthdays are also null when I request /me/friends?fields=birthday
My access token has the friends_birthday permission set.
I also tried with birthday instead of birthday_date in the FQL query. Same result.
I imagine that this happens because they opted out somehow, but I don't know how.
Is there an alternate solution to actually get their birthdays from facebook?
It's also possible to remove the ability of apps to access your data when your friends use them, this option will prevent the current session user from seeing some information about their friends via the API, even if that information is accessible on Facebook.com
This setting is in the privacy settings, at https://www.facebook.com/settings/?tab=privacy, under Ads, Apps and Websites -> 'How people bring your info to apps they use' and looks like this:
{edit} you can test this for yourself with test users, it's the most likely reason assuming the birthdays are visible to you in the frontend
These people might have set their Birthdays visible to only themselves or only some restricted friends. This is an option available if we try to edit our Birthday by its side. That can cause it is not available to your query by app.

Possible to get Fan Page Update Information via API?

I receive an email once a week with information on my Fan Page (like how many more users than last update have become my fan, how many posts, etc). Is it possible to get this info via the FB API so I can show this data where I want outside FB and outside my email?
One of the way is using fql of facebook :
Group FQL Table
After you can get the group ids, you can use the group_member tables to get all members from that group:
Group Member FQL Table
You can even use Graph API if you want but I am not an expert of that

get a list of people using my facebook application

I want to get a list of all users (even if they are my friends or not) who are using my facebook application. Is this possible? If so, how?
And another quick question if we're still here :) Assue I have a facebook id of a person, can I retrieve his name by using it?
I don't believe that you can get a list of all the Facebook IDs of users of a particular application. There doesn't appear to be a possible query for this based on an examination of the FQL tables, probably due to performance and privacy reasons. Generally the presumption is that you maintain a local list of users in your own application, and correlate them to Facebook via their ID, so you would already have all these IDs.
To answer your second question though, yes, that is definitely possible. The Facebook API provides both the users.getStandardInfo and the users.getInfo methods, both of which take user Ids and return information about the user, including the name. users.getInfo can even be used without a session key to just get the name of the user.