Facebook Graph API Get feed/posts is missing wall posts - facebook

I am building a basic app for a research project. Basically, we want to see if brain surgery alters behavior based on user's facebook posts and interactions. In other words, we are trying to read all wall posts from specific users.
My initial ideas was this: As long as the researcher is friend's with the subject, I can call https://graph.facebook.com/UID/posts and https://graph.facebook.com/UID/feed. A combination of those two should give me all relevant posts.
This works perfectly for some users, but for others, I'm only getting some random posts while missing many others. For some users, I'm not getting anything at all. I cannot find any pattern as to when posts are shown and when not. Does anyone have an idea what the problem could be and how to solve it?
I'm using the read_stream permission.

The most likely answer is that the user's friend disabled API platform access in their settings or locked down the privacy in some of their posts.

Related

Is there any way I can display all post from facebook and not only mine?

I'm working on an app in which I intend to display the existing posts from my Facebook wall but in another design. I succeeded in getting my personal posts but for some reasons I cannot find the posts of the other users in my feed. Is there any way in which I can get all the post from my wall including my friends? Is this even possible? I could not find an answer yet, not even in the docs.
Thanks!

Facebook Graph API insights

I'm new on working with Facebook and honestly I found it very confusing, terminology and documentation seems to be very ambiguous in many cases. Can somebody please help me out with a plain english explanation on how I can achive the following?
Post and image to Facebook (on the user page) and then check the stats (insights) of that post.
Till now I have managed to:
1) Create an app
2) Post the image on the user page with the desired message
I'm not able to understand how I can retrieve information about the particular image which was uploaded through my app. I want to know how many people have viewed that image, how many likes did it get, how many times it was re-shared.
Is it possible at all?
I'm posting to /photo not too /feed and I will like to keep it this way if it is possible.
Sorry if this was answered already but I spent a few hours trying to find an appropriate answer but wasn't able to get the right documentation.
UPDATE 1
After having a couple of days off from this topic and receiving the first 2 answers, I took another dive into this. Now I have tried the Graph API Explorer as suggested, and using the ID of a POST I can get some details about the POST, but the insights aren't showing anything, just next and previous.
My goal is to be able to gatther some stats about the pictures uploaded through the app. If this is not possible directly what should be the approach I need to take?
I don't believe a personal /photo has /insights attached to it - the Insights Object documentation page suggests that they do not - but you should be able to get likes, shares, and comments via the API.
It would appear FB has launched a redesign/reorganization of its documentation in the last couple of weeks, but the documentation for the /photo graph object is here -- you will need the user's Access Token, and the API endpoints you're looking for each have links to their own documentation pages there, including example code for each type of request.
Edit (summarizing discussion in comments):
There is no method via the Facebook API to gather insights for all photos posted to individual user timelines via an app. The app can gather likes, shares, and comments for each of those objects individually via API requests, and can make API requests for insights for photos posted to its own timeline. Neither of those options solves the intended use case here.
I'd recommend a solution that uses Sharing rather than an app integration, as this allows for better access to insights on the photos being shared. This is also a much simpler integration, and less brittle wrt future Platform changes. The main tradeoff is that the original photos being shared are expected to expire after a couple of months -- if this is unavoidable, I'd suggest implementing a redirect for requests for expired objects on the site.
We are able to get different kind of photos or picture Using Graph API
like as below:
1.Page Photos
Photos for a Facebook Page.A Page Access Token is required for all methods.Find here
2.Page Picture
Picture belonging to a Facebook Page. Find here
3.Photo
Represents an individual photo on Facebook. Find here
4.User Photos
Photos for a person.Find here
I hope it's helps you.

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.

Find 'posts viewed by user' facebook graph api FQL

I am trying to build an algo which is quiet similar to edgerank algo of facebook. I am kind of missing 'edges' part, which is about user view anyone's post and hence creates an edge in this. Is there a way to get the posts user has viewed irrespective of user liked/commented on them. Apparently I believe this is somewhat not feasible after doing some research on graph/fql. But, did anyone of you came across anything like this?
No, there is no way, via an API or any other method open to developers, to see what posts the user has or has not seen. The only thing you could go by is likes, comments, and shares. That's it.

How to enable comments and likes for my posts made with my Facebook app?

When my Facebook app posts to the users stream those posts do not get links for Like and Comment. Other Facebook publishing apps, like Instagram, get these links.
I can't find it in my Facebook application's settings. Anyone knows how to do it?
(I think this is the same question as this one: Facebook : Like and Comment Functionality against Wall Post but I'm not sure.)
See Traroth's comment to get a more to the point description of what it is I'm asking about.
It seems Nathat Totten is right about how these links are defaults and that they are controlled by Facebook. There are three things that confuses this issue.
One is that Facebook Test Users behave a bit more special than you might think. Even when they are friends, they are not fully so. Making these default links turn up only for the user that posts them (for Test Users, mind you, I'm hoping it'll work all right for real users).
Another is the documentation for actions in the Facebook Graph API documentation for publishing Post objects:
A list of available actions on the post (including commenting, liking, and an optional app-specified action). read_stream. A list of JSON objects containing the 'name' and 'link'.
Which made me start to try find out how to include the commenting and liking links myself. I can't find this info anywhere, so maybe that changed without the above quoted documentation reflecting the change.
Anyway, if, indeed this is a Test User issue, then I don't need to do anything special to fix this. I'll try to remember to come back here when my (iPhone) app is ready for the real Facebook world and I get to see if it works in that environment or not.