Why can't the Facebook Graph API access public posts? - facebook-graph-api

I know this question has been asked before, but I have yet to find a satisyfing answer. I want to access Facebook posts by two different users, let's call them Kenny and Stan.
Both users have posts that clearly are public – I can see them through my regular user account even though I have no connections whatsoever with Kenny nor Stan.
I know I can access other users public posts using the same method (see below).
I can access Kenny's posts via the Graph API Explorer. I cannot access Stan's posts through any API means though.
But here's what happens when I use this method https://graph.facebook.com/USER_ID/posts?access_token=APP_ID|APP_SECRET:
Kenny: I can only see a limited amount of the "posts", namely all his new friends and other people's comments.
Stan: All that shows up is the empty data array {"data": []}.
Third random user: I get precisely what I expect, all the public posts.
What is the cause of these seemingly random responses? I suspect it has something to do with the users privacy settings, but I tried accessing their /permissions endpoint and got even more errors (yay Facebook).
PS. Using the access token that the Graph API Explorer generates, I am able to access Kenny's posts via a GET call to the Graph API. I don't know what to make of this.

Related

Getting private posts from Google+ using APIs

I worked with facebook graph API.
With a Facebook application I was able to retrieve user information (e.g. posts, status update, and so on) using graph APIs. Of course, it can be possible only for users that accept to share their information with the application.
I'm going to do the same with Google+. First of all I want to say that I'm new in the google+ universe.
Reading Google+ documentation I'm aware about the possibility to fetch public posts using something described here:
https://developers.google.com/+/api/latest/activities/search?hl=en
Of course, here they talk only about "public activities".
Does exist on Google+ a similar mechanism to Facebook application that allows me to retrieve private posts from a user (after that he approves my application of course)?
This is not currently available.
You may wish to star (and thus follow) this issue to indicate you would like to see this as a feature and to track progress or responses from Google.

is it possible to use Facebook Graph API to get just my own wall posts

I just want to know if it's possible to do the following:
To display some wall posts from my own facebook account in a php web page, without going through the granting-permission in the user interface level? Because from what I know, you need an access token to use the API, and to get an access token, you need to go through the granting-permission UI. So I am feeling impossible here.
I got my app ID and secret code ready, I just want to know for sure if what I want to implement is even possible to begin with.
Actually, you could change your privacy permissions so that your wall is completely public. The API is then able to access public information without being granted user authorization.
I was also searching the same, as I want to implement it in my project. Now I've got the answer of this. Yes, you can get posts as well as comments from your wall. If you want more details about same, comment below mentioning my name. :)

Cannot retrieve public posts via Facebook Graph Explorer due to "Unsupported GET request"

I'm trying to retrieve a number of public posts from facebook via the Graph Explorer Interface, and I'm running into the "Unsupported get request" exception.
A lot of posts on StackOverflow say that this is because you need to acquire some user_access permission, but as far as I understand, that shouldn't be the case here.
The ID of one of the posts I'm trying to access is:
224393774239629_508106655868338
If it were restricted, I shouldn't be able to see post here without logging into facebook:
http://www.facebook.com/224393774239629/posts/508106655868338
So that should rule out the problem with restriced access.
So is this a bug in the facebook graph explorer?
Or am I missing something?
Ok, weird.
The link to facebook I put in does actually require you to login to facebook. But if you copy-paste the link into the addressbar instead, you apparently bypass that restriction, which led me to believe that the link didn't require login.
So I suppose I'm back to figring out the access restriction issue.

How to use Facebook APIs to show one's friends list to other visitors?

I'm able to fetch my friends list using Facebook API (which requires me to log into my FB account) and I'm trying to show my friends list to other people visit my site.
I've tried using Twitter and its quite simple. https://api.twitter.com/1/friends/ids.json?cursor=-1&screen_name=codef0rmer returns my followers ids.
Is that possible using Facebook API, If yes, How to do that?
To access the /friends connection you need a valid access token for the current session. This means you can't access this connection for other users
https://developers.facebook.com/docs/reference/api/user/
https://developers.facebook.com/docs/reference/fql/friend/
This means that unless you get a users friends and store them in your database, you won't be able to do this. ( Unless you use longer living access tokens (I say longer living as offline access is being deprecated)
Saying this, I'm not sure if you are allowed to store this information. I know friendslists aren't allowed to be shown to other users so this is potentially dangerous territory on facebook TOS. The privacy policy is here https://developers.facebook.com/policy/ but I think this is something you may need to clarify with Facebook directly as it looks like a slightly grey area

Retrieve comments Facebook users make as the Like a web page

I've been pouring over Facebook's Graph API but I can't seem to find any documentation with regards to retrieve comments users leave as they Like an Open Graph object (in my case, a web page with a Like button).
At a minimum, I would assume that there would be some way to retrieve comments from users whose privacy settings allow anybody to see their updates (I guess this might require me to know the UID of everybody who Likes my web page). Alternatively, there might be some method where user comments may be associated with the Open Graph object's stream instead.
Anybody?
To see a user's wall feed via the API (even public ones) you will to have them authenticate your app. Yeah, pretty crappy not to be able to query their public messages, but it is a current limitation of Facebook's API.