Is it possible to access insights data on a particular Open Graph story via one of the Facebook APIs? - facebook

Given an Open Graph story ID, is it possible to read insights Impression and Referral data on the story via any of the Facebook APIs?
A thorough review of the API documentation suggests it's not (but FB's API docs can get out of date) and previous SO questions have not been promising (but none of the answers seem definitive and anyway times change). Something like the following seems like a reasonable guess for where they might be available:
https://graph.facebook.com/[og_story_id]/insights
Testing queries along those lines does not error, but also hasn't turned up any real data.
As a addendum and potential hack, is it possible to access the comment or like count for an Open Graph story?

It is not possible to update the existing isight using the endpoint the only it allow only the get request post and put is not allowed for this end point

Related

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.

Reading user's posts to pages

For a given Facebook user, is there a possibility to read all posts that he's made to any pages? On FB web, these can be found in the activity log, but so far I couldn't find a method to get them via API.
Both /user/posts and /user/feeds only contain status and profile updates, not posts to pages. I know I can read /page/feed and use paging to find this user's posts for any page the user likes, but how about those he doesn't?
No, outside of FQL, there is nothing in the API that accomplishes this. I'd imagine this to be a pretty data intensive call with minimal use cases however, so I don't think this will be introduced anytime soon.

Does facebook open graph's fb:explicitly_shared require approval even for developer?

fb:explicitly_shared=true, image[0][user_generated]=true, I expected the action to display with a full size image in timeline and a small story in activity feed. Instead, I get only the small (with the smallest thumbnail possible) in the activity feed. Nothing in timeline.
The documentation is unclear. Documentation states regarding user_generated:
While it might seem appealing to always use user_generated photos, there are some criteria that must be met in order to maintain a good user experience, and for your app to get approved for the capability to be used by people who are not developers or testers of the app
This does not specify whether 1) The POST to /me/namespace:action will succeed without error for the developers but still not display in the timeline or 2) The POST to /me/namespace:action should behave in every way as if "User Generated" was approved (for posts on behalf of the developers)
I have the same question about fb:explicitly_shared. Cannot determine whether behavior is unexpected because expected behavior isn't clear in documentation.
Following all examples documented with variations on what is in the meta tags and the data posted to /me/namespace:action there is simply no way for me to get anything to show up in the timeline (aside from posting directly to feed).
Do not test any of these things with the Graph API Explorer. The Graph API Explorer appears to be partially sandboxed in it's own special way.

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.

Why Facebook Graph Api or FQL does not work for high traffic pages?

I am having this problem. When I try to get the links posted by the user or page it works fine for all, except for high traffic users or pages like 'thebeatles' or 'ladygaya' or'machaeljackson' etc.
One thing we found out was that when you fetch links through graph api, it gives all the comments and evrythign back. In case of celebrity pages, there are thousands of comments, whcih are returned back, and cause to throw a curl exception.
So we switched using FQL and its better as it just provides the links, but in this case also FQL does not work for celebrity accounts. We just can't seem to understand why?
Did anyone come across this problem or know of any way to solve this?
Is it possible that you're trying to retrieve so many comments that it's timing out on Facebook's side?
Have you tried asking for a subset of the comments using offsets or timestamps? Check the 'searching' section of https://developers.facebook.com/docs/reference/api/ for more information
(disclosure: I work for Facebook in the Developer Relations team)