I am trying to retrieve metrics post_impressions_unique, post_consumptions or anything started with a post but Facebook always return empty array for me.
Anyone know what is the problem here?
Are you sure you have the right permissions?
You need read_insight permissions to view post impressions using fql or the graph api.
Here is more information Facebook Developer Guide
As well as needing the read_insights permission, this information is only available for posts made by your page, so check you're actually checking the right posts
Make sure you pass in the entire object ID of the post. It will be of the format pageid_postid (eg. 24379523495_8924592457245) and you need to quote it in single quotes - otherwise you'll get an error about an unexpected underscore.
Related
I am trying to get all the reactions of a facebook post with post_id/reactions in Graph API. But the returned data array is always empty. I have generated the access token with all the user data permissions. I am attaching a screenshot of the scenario.
Does this problem has something to do with some more permission?
EDIT:
I also found out that this post_id/reactions is only showing the data of my reactions of a post. So, if I react on a post and do a graph api query for that post, it will show my information only. Does anybody know the reason/solution for this? Attaching the scenario.
EDIT 2:
I followed a youtube tutorial to do it like this. But apparently, it cannot be done (at least with this way!). It is mentioned in the documentation (screenshot attached).
If anybody can still provide me any other way to do this, please mention.
You can view the reaction of the user if you have his access token. This with:
{post-id}/?fields=reactions.type(LIKE).limit(0).summary(1)
The returned field "viewer_reaction" is the reaction of the user in the post.
i`d like to get the number of persons that where reached by my post.
I have tried /{post_id}/insights/page_impressions and anything else listed on the Facebook API-Documentation.
Facebook API
but i only get a emty data array and nothing else.
It seems like a lot of people don't get this number, is there any solution?
Check the permissions you've requested with the token and make sure that read_insights is included. Here's a screenshot from the API explorer:
Hi,
As title, in my facebook group, I need to retrieve only post without comments.
I see the search box and notice that searching something will give an url with
`?query=Word%20Search`
and maybe there is a way to search post without comments by url.
Thanks for help!
You must use the Graph API to retrieve data from Facebook. There is example code how to get the group feed in the docs: https://developers.facebook.com/docs/graph-api/reference/v2.2/group/feed#read
You canĀ“t filter by posts without comments, you need to do the filtering on your own after getting the posts.
I'm trying to retrieve the comments marked as spam/hidden or deleted by the admin of a page.
I can't find a way to do that.
Please help!
if its not in facebooks API documentation then I dont know what to tell you, you most likely cant do it. I would think that stuff that has been deleted is only accessible if your Zuckerburg.
Have you tried using FQL. Try querying FQL comments table.
at the time of this question, if you go here:
http://www.facebook.com/realplayer
you'll see six posts down, I have posted a photo with a message of "#highfive Cincinnati, OH"
but if you to either of these:
http://graph.facebook.com/realplayer/feed
http://graph.facebook.com/realplayer/tagged
the JSON that is returned seemingly includes everything on the wall, except for MY post. there is another photo post from someone else down below mine, and it is showing up (and both my photo and his photo are in the "Fan photos" section)
obviously, since I can see everything with these links already, it appears that access_token is not a part of the equation... BUT, some more info:
if I use an access_token from a session that isn't me, I can't see the post in the JSON
if I use an access_token from MY logged in session, then I DO see the post in the JSON
so I'm very confused.
if everyone in the world can see those posts on the wall without even authenticating, then I expect all of them to come back in the graph api as well.
anyone have thoughts on this?
I am aware of the "manage_page" permission... which I can use to get a list of accounts and special offline access tokens for those pages... and that's something I can explore... but it seems like alot of work when my post seemingly SHOULD be there in the graph
well looks like FB has this nice little anti-spam feature for pages... such that a non-admin can't write lots of messages on your page. what's interesting is that facebook uses similar "silent treatment" techniques that StackOverflow uses ( https://blog.stackoverflow.com/2008/09/podcast-21/ )... so when I look at a wall that I've been "spamming" I will see all of my posts... but no one else will.
I was able to create a new test account and get about 3 or 4 messages on a page before it started blocking me again
so probably the Graph API is working as designed :)
========================
UPDATE: this appears to only be part of the problem. I have constructed another page and app and been doing testing:
http://www.facebook.com/pages/RP-Test-Page/116735865065591
note the entry for "#highfive Orlando, FL" ... even an unauthenticated user can see this entry from the actual page... but there is seemingly no way for me to get it back through the API. He only posted once, so it can't be an "anti-spam" thing (you wouldn't think).
I have obviously tried the Graph API (with and without my own access token)
I have tried FQL (with and without my own access token)
and I have followed this post:
http://en-gb.facebook.com/topic.php?uid=10381469571&topic=3815&post=51980
in order to request manage_pages and offline_access extended permissions from myself and use that to get the /me/accounts and then get the "impersonation" access token (whew)... STILL NOTHING
there must be some other super security thing going on. is it not possible to reliably get all of the wall posts from a page?