facebook graph api friends_religion_politics permission problems - facebook

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?

Related

Facebook insights for personal page

I was wondering if it's possible to get some kind of insights,using facebook graph, for the personal profile.
Basically I want to know some demographic information(age,gender,location) about the user who shared, liked my feed posts.
I found on the internet that wolfram alpha can do this, although I tried using my profile and besides some information about me, it didn't show any demographic data.
https://www.wolframalpha.com/input/?i=facebook+report
So do you know how get I get some demographic data about the persons who liked/shared my posts.
Thanks,
Not possible at all. Without authorization, you can´t get any detail of the user - for obvious privacy reasons. Insights are for Pages only.

Getting a permission to see information for all the users in Facebook

When I use the search box in Facebook and try to find a user, it shows me a list of all the matching users while I'm typing, along with additional information on them, such as the city they live in, and when I enter their wall/timeline, I can see more information. However, when I use Facebook Graph API to search for users, I get only basic information, and must have a permission for each user in the results to get more. Why is that? Is there a way to be able to see more information for all the users without having a permission for each of them?
[…] and when I enter their wall/timeline, I can see more information.
Only if they have the visibility of their profile to public, though. Otherwise, you won’t see much on a user’s profile if you are not friends with them.
However, when I use Facebook Graph API to search for users, I get only basic information, and must have a permission for each user in the results to get more.
Why is that?
Because, naturally, you as a normal user browsing through a couple of search results on Facebook is something completely different than offering an app the capability to access all that information for every Facebook user from ID 1 to 99999999999, and then build some huge data mining thing upon it … I think that should be quite obvious.

New app not available in list for "insights for your website"

I created a new app last week with the purpose of using Facebook insights for our website, but it is not available in the list to make the connection with. Do I need to do anything to make the app selectable?
For any of you people who think this question is not technical and shouldn't be here, I was directed here from Facebook bugs because it's not a bug.
I have had the same issue but after a bit of experimenting I found that it does not affect the ability for you to claim a domain and associate it with an app.
What the drop down list does is generate the code snippet shown below. I'm guessing this was useful when you was able to link it to a page_id (you can no longer do this). As long as you have put the correct meta tag (such as that below, replacing %%app_id%% with the app_id given by the Facebook App Center) you are free to ignore what account is shown in the drop down.
<meta property='fb:app_id' content='%%app_id%%'/>
Once you have linked the account you can go back to the Facebook App Center and set permission on the account.
Tip: While you can only give other verified developers Manager access to the app you can add any friend or email address to the insights level of access which is all which they need.
Not sure if this is the case here. But I do know that there is a threshold to see insights with regard to pages.
As detailed here in the FAQ's -
Is there a minimum number of users to see Insights for Pages? Yes. For
user privacy reasons, Insights are only provided to Pages with greater
than 30 users who like that Page.
Perhaps there is a limit for domain insights too. You should allow some time and some traffic pass before the insights start being able to give feedback...
I had the same error, I tried to debug my site here FB Debugger
which is the official debugger you can input URL, Access Token, or Open Graph Action ID.
It works for me.

Facebook - public posts not appearing in Graph?

I am currently trying to get the posts for a specific user from Facebook's Graph API. I have done this numerous times before using a php script I have developed; but the problem this time seems to be on Facebook's end, not mine.
I am trying to get the posts from (replacing TOKEN with an access token):
https://graph.facebook.com/100001558773450/feed?access_token=TOKEN
The graph won't show any posts by the owner of that page but will show everyone else's posts, and as far as I can see the posts are marked as public, and there are no privacy settings set on the account that would stop it from adding the posts to the graph.
Any ideas?
Thanks,
Nick
Check that you have requested the manage_pages permission to give you full access to the page (if you need access as the "page owner").
Using the access_token you've got, according to this documentation there are three different things that you can select feed, statuses and posts.
I'd give those three a go from https://graph.facebook.com and if what you get back is what you require.
https://graph.facebook.com/100001558773450/feed?access_token=...
https://graph.facebook.com/100001558773450/statuses?access_token=...
https://graph.facebook.com/100001558773450/posts?access_token=...
You need to check the "profile" privacy settings (what to share with apps). But most importantly, this is against Facebook ToS!
You can't use a user profile to represent your business, you need to use Facebook pages instead!
More can found here:
Why should I convert my profile (timeline) to a Page?
Since profiles
(timelines) are for meant individual people, they aren't suited to
meet your business needs. Pages offer more robust features for
organizations, businesses, brands, and public figures, which you can
learn more about here.
Further, maintaining a profile (timeline) for anything other than an
individual person is a violation of Facebook's Statement of Rights and
Responsibilities. If you don’t convert your profile (timeline) to a
Page, you risk permanently losing access to the profile (timeline) and
all of your content.

Facebook extended permissions and interested_in property

Which Facebook extended permissions makes the interested_in property of friends show up?
I've tried using friends_about_me, friends_relationship_details, and friends_relationships.
Which one is interested_in located? I'm using the Facebook SDK for iOS devices by the way.
If not enough are found, is it because I'm doing something wrong or is it the individual users' settings are set up that way? On the Facebook profile page it might show Interested In: Women while the Graph API query might not show it even with the above extended permissions granted.
Also when I try it with a query string ID?fields=interested_in, I get nulls, except for a couple.
The permission is "friends_relationship_details". The query you are showing above is actually correct. The one thing you are forgetting is that ultimately each use can set what data their friends can share about them. The default settings for which information friends can share does NOT allow friends to grant an application access to "interested in and looking for" and "religions and political views". So in short, your query is correct and you are getting all the information you are allowed to access.
Most Facebook users have not changed these settings, meaning that only the users that have explicitly allowed friends to share interested in information will show up in your query. This will be almost nobody which is why you only have one result in your query.
To see what I am talking about go to: http://www.facebook.com/settings/?tab=privacy, click the "Edit your settings for using applications, games and websites." link, then click "Edit Settings" in the "Info accessible through your friends" section. Here you will see what permissions you allow your friends to share. There is no override for this. If you don't want the information shared, your friends can't force you to share it.
Sorry for the bad news.