query privacy setting on profile interests - facebook

I'm writing an app to help users understand their Facebook privacy settings. I know how to access the privacy settings for a specific video, note, link, photo, or photo album. However, I want to determine the user's privacy settings for their extended profile information, such as favorite books, movies etc.
Is there a table to access this kind of privacy information?
Related:
Without the user_likes permission, I can only access favorite movies if their audience selector is set to public. With user_likes, I can access favorite movies no matter what the setting. However, I also want to determine the state of the audience selector for favorite moves, not just access their favorite movies.
Thanks!

No, Facebook does not expose user privacy settings via the public API. If your company simply cannot live without it, then you should have your business development team contact facebook to see if an agreement can be reached. It'll probably cost lots of time and money to pursue it with Facebook.

Related

Is there any way to retrieve a user's "Apps others use" Facebook privacy settings?

Background:
After thinking that I had managed to successfully navigate Facebook's gauntlet of privacy settings, I have fallen prey to yet one last unexpected hurdle.
My Facebook app allows users to post content to Facebook (status updates, photos, etc). It also allows users to browse and view the same content of others who are users of the same app. Even if two users (that are friends) have:
granted the necessary permissions (read_stream, user_photos, friends_photos, etc) to the app
successfully posted content with the sufficient visibility to Facebook through the app
the ability to see each other's posted content on Facebook itself
It is still possible that they can't read others' content through the app due to the "Apps others use" privacy setting which restricts what information others can see through the Facebook platform, despite that the user has specifically granted access to the app for that content (ugh).
This little quirk makes for a terrible user experience, so I would at least like to be able to detect that a user has this limitation in place an inform him/her accordingly.
My searches through the FQL tables have come up fruitless, but I'm holding out against hope... Is there a (undocumented?) way to retrieve the "Apps others use" settings for an authorized user via Facebook API method?
Does the page http://nakedsecurity.sophos.com/2013/04/03/how-to-stop-your-friends-facebook-apps-from-accessing-your-private-information/ give you some help?
For going to that, is like in the image : Go to the gear icon at the top right > Account Settings > Apps > Apps others use and then customize it.

How to inspect about the privacy setting of a given user's birthday, friends on facebook

How can we inspect whether the facebook profile privacy setting for a given user's birthday, friends, family is public, friends or custom....
I am able to get the privacy setting for user's photos, videos and posts whether they are pubclic, friends or custom. But how can i do it for user's personal info like birthday, family etc.
Please guide me...
There is no API which will return this sort of information.
If your app can, from the perspective of a given user, see the information, that should be enough for your purposes, no? If you can't see a particular field, the user whose access token you're using can't see it or it's not present.

Graph API end point to get the new "per-app post privacy" controls

A facebook user can now specify post privacy on per-application basis. This is explained by facebook on their blog.
In my web application I let people specify privacy settings while posting to their news feed. If a user has specified rather restrictive privacy than the one with he is posting to, facebook will enforce the restrictive settings as specified by user.
This results in bad user experience. I want to know if there is a way, preferably a Graph API end point, that lets me know this setting for a user. If I could fetch this information from Facebook, I could show a proper alert message, 'that to use a rather less restrictive privacy settings, (s)he will have to change his/her application specific privacy settings'. Or I could show only more restrictive privacy settings to the user while posting something in my UI.
Any pointer to where Facebook has documented this new feature from developer point of view in details is also appreciated.
I believe the privacy_setting table (available via FQL) provides what you're looking for.
https://developers.facebook.com/docs/reference/fql/privacy_setting/
*An FQL table that returns the default privacy settings that a user has set for an app.
To read the privacy table you need the following permissions:
User access_token
The data returned is for the user and the application associated with the given access token.
Example
Select the default settings you have set for this app (try this query for a test application):
SELECT name, value, description, allow, deny, networks, friends
FROM privacy_setting
WHERE name = 'default_stream_privacy'*

facebook graph api friends_religion_politics permission problems

I'm working with facebook graph's api trying to get the users religion and political field. I have the friends_religion_politics permission set and signed in but when I test the application on my account I only get one of my friends religion and political fields.
The general inquiry I'm making is:
https://graph.facebook.com/me/friends?access_token=%3Ctoken%3E&fields=religion,political
Confusingly enough when I run just that I get 4 friends religion and political views but still far from all of theres.
Am I doing something wrong on the permissions or is it something like the default privacy settings doesn't give apps acess to those fields?
Facebook privacy settings allow users to keep their friends' apps from retrieving lots of information, including political and religious views. This is why sometimes they provide the information in their profiles and yet apps still do not fetch that data.
You can find this by going to your Facebook privacy settings (click the downward-pointing triangle in the upper right corner and then select "Privacy Settings.") Click "Edit Settings" next to "Ads, Apps, and Websites." One of the settings you can edit is titled "How people bring your info to apps they use." This setting allows people to check or uncheck lots of boxes depending on what information they are willing to share with apps their friends use.
It seems that a lot of people choose not to share their religious and political views with apps. But it seems your method of fetching what data is available is the correct method.
I checked with my friends and informations are coming correctly ...those who provided that particular information...
using graph api
If you are getting the values of your four friends then it means your code is correct working. Facebook fetches the information from its tables if the information exists. IF you are not getting the values from other friends, then it means they have not provided this information in their profiles. You just check their profiles.. Your code is wrong if they have information in their profiles but you are not getting.
I am not sure that the access token has necessary permission to get political views. The fact that you are getting 4 friends whose political views you can see, does not mean that the permission setting is working properly.
When I queried my friends political view from Facebook reference api site, I was able to get political views of two of my friends. May be those two friends have customized their privacy setting to allow everyone to see their political view. (By the way the political opition of both those friends were "political": "Not Interested In Politics (Nil)",
).
I will create a test case. In case, if you have a friend to help you with, you can ask him to open up his political view and then query again. And also ask one of your friend whose political view is already visible to your application, to see if he did customize his privacy setting.
Also I hope that you have an expiring access token. May be you have an offline_access permission and this creates an long living access token. You should try invalidating your token if you think this could be your problem.
I've tried to get at my friends religion, too, but never get a value for the field.
I am of course having the friends_religion_politics permission.
Tried both the Graph API and a FQL query.
https://graph.facebook.com/me/friends?access_token=xxx&fields=religion,political
-> just retunrs the ids of friends, nothing else.
Is there an issue with the API?

Caching facebook profile pics?

I'm building a site that allows users to sign in using their facebook account.
I want to cache nice big versions of the users profile pictures. I know that i'm not allowed to cache images for more than 24 hours so i'm going to re-fetch the images once every 24h.
I thought i could get the url of the image original like this:
$fb=new Facebook($key,$secret);
$query = "SELECT src_big FROM photo WHERE pid IN (SELECT cover_pid FROM album WHERE owner = ".$id." AND name = 'Profile Pictures')";
$imgurl = $fb->api_client->fql_query($query);
http://wiki.developers.facebook.com/index.php/Photo_(FQL)
But i get an exception saying "Requires user session". Why do i need a user session? Is there a workaround for this? How does other sites solve this?
If i have a user session it works for some users but not all. Why not?
Rules on photo accessibility are detailed with the Photos.get API method.
Privacy Note: Photos are visible on
the Facebook Platform only if the
photo owner has authorized the calling
application, or the photo owner has
not turned off access to the Platform.
The Photos.get method is essentialy a wrapper for querying the Photo FQL table so it follows the same rules.
Consider asking users for the offline_access extended permission so you can query their own photos even when they're not online. You'll need to store their session key in your database and make queries with that, but it will mean you can pull down the photos of users who have authorised your application whenever you want.
For when it sporadically works: Some users may have set privacy settings to disallow applications access to their profile pics.
Possibly some users might not have uploaded a profile pic.
Edit: From the (new)fb menus go to: Account > Privacy Settings > Applications and Websites > What you Share
(This page explains about how the user's privacy setting choices affect fb-enhanced websites)
In short the external website can only access what fb users have made available to 'Everyone'.