Accessing Information of friends of my website user - facebook

I have a tough situation here. When a User A logs into my website he authorizes me to pull out his information from facebook. Now what I am doing is searching User A facebook friends present on my website(suppose I got User B)..and then showing User A information of User B friends. Now I am getting very limited information of User B friends even if User B has authorized our site to pull out information of his friends.
Please give your input.

User B would have to have very open privacy settings for you to get information on them, unless they have also allowed your application. The default settings are pretty relaxed, but I suspect lots of people, like me, disable everything.
Ignore the red circle, that was for another answer along similar lines.

Related

How to get link to user's timeline from Facebook Messanger Platform API?

Did I miss sth or it is impossible to get link to user's timeline from Facebook Messenger API?
According to: https://developers.facebook.com/docs/messenger-platform/user-profile User Profile API doesn't return link in fields.
Is there any other option?
You would have to use the User Profile endpoint and use all the information for determining which Facebook user it matches to. If you image match the profile picture and match all the other information, and compare timezone to their location, it is probably possible, but it's probably not easy.
Making a workaround like this might not be a bad idea because Facebook seems to want to keep all the stuff seperate right now, as their user ID's are different for seemingly everything. The User Profile endpoint exists for personalization purposes, but it doesn't identify a user.
The user matching through login might also be useful as a outside of messenger solution, but I'm not sure exactly how that would be done.

How does Amazon ask for so many permissions on Facebook on one screen?

I'm working on a Facebook app that requires a few basic permissions (email, birthday, etc) as well as publish_actions (so I can create stories about user interaction).
When I ask for these permissions, the end user is presented with one screen for the basic permissions and yet another for the publish_actions permission.
However, when I looked at the following app from Amazon:
http://www.amazon.co.uk/gp/socialmedia/promotions/SprngSweep
When I click on the enter button, I am redirected to Facebook to ask for permissions (as expected), however, they have all their permissions one page (Amazon would like to access your public profile, friend list, email address, birthday, photos, videos, personal description, likes and your friends' birthdays and likes. Amazon would like to post on your behalf. Amazon would like to access your data at any time.)
I can't add a picture due to lack of rep
The url that I'm redirect to is this:
https://www.facebook.com/dialog/oauth?client_id=164734381262&redirect_uri=https%3A%2F%2Fwww.amazon.co.uk%2Fgp%2Fsocialmedia%2Ffbr%2Fconnect-handler.html%2Fref%3Dfbr_hn_SprngSweep%3Fie%3DUTF8%26appName%3DAmazon%26externalApp%3DKindle%26onSuccess%3D%252Fgp%252Fsocialmedia%252Fpromotions%252FSprngSweep%253Fie%253DUTF8%2526sm-sweeps_submit%253D1%2526sm-sweeps_submit.x%253D66%2526sm-sweeps_submit.y%253D20%2526sweepsConnect%253D1%2526sweepsEligibility%253D1%26ref%3DSprngSweep%26token%3D6CBF36BD25311891B2F205333EFA3AA78E561AB9&scope=
While attempting to investigate this myself, I noticed that they aren't even passing a value for scope in the url.
How the hell are they doing this?
Most likely they are using an old API (FB changed the behavior over there recently, read their blogs please) or they are using hidden features which FB created for them (as this has an impact on there advertising revenue obviously, and even these guys are "coin operated").
The "two pager" is normal, FB API and FB advertising API quit the same. I wouldn't worry.

Facebook will not allow me to post to a user's wall without a dialog. How can causes.com get away with it?

I have an app that allows users to share the page to specific users by clicking on check boxes next to their name and then doing a bunch of posts. I received an alert in February that said I would not be able to post to friends' walls unless there is a dialog box.
However, I noticed if you sign a petition on Causes.com, they do something very similar where they post the petition to a bunch of friends' walls.
I'm curious how they get away with that. Maybe I'm not familiar enough with the Facebook API.
I'm not sure if this helps, but Facebook does have business partnerships with certain sites/companies that have more privileges to their api keys, facebook app. This could be one of these instances.
One instance of this is, when you go to a major site and the site is able to read your facebook session, and within that site they show your name and picture once the site is rendered. In essence, these sites already know who you are.

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.

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?