Facebook Graph API - Getting Comments - facebook

I'm trying to use Facebook graph API to get all the comments (mine and others) on my Facebook posts.
Currently I'm testing the api using Graph API Explorer & so far I'm getting only my comments.
I want to know did they change their policy or is there a way to get all the comments?
P.S: I didn't write any code so far.
But I followed the link:
https://developers.facebook.com/docs/graph-api/get-started
to use the graph API explorer and this is what I'm getting:
the image
In the "Tools" you will find the tool. And as you can see you will get the list of the comments. I'm just showing one of my comments (testingggg) as an example.
Unfortunately, the API doesn't give me the others' comments.
Am I missing something?
Thank you.

according to the document this is the way to get all the comment docs

Related

Facebook Graph API: Call_To_Action for https://m.me links

Any dude could disclose how to do this?
What I want is, to use Facebook Graph API to post on my own page. The post should have the call_to_action button, which is linked to https://m.me/mypage
There's not much on call_to_action topic on graph api documentation. Scraphing through Google shows no related results/experiences. The ads-doc is restricted to ads-posts and not complete!
The following cta-types are not working: MESSAGE_PAGE, OPEN_MESSENGER_EX, OPEN_LINK and GET_OFFER... They all do not accept link to https://m.me. But external link likes: http://stackoverflow.com will works.
Following error shows:
(#100) Call-to-action is only supported for external links and some
types of Facebook links.
Any help are appreciated :)
Thank guys

Not getting all comments using Facebook Graph API

I'm trying to get comments using Facebook Graph API using this code
https://graph.facebook.com/post_id/comments?access_token=XXX
where XXX is replaced by my access token. The problem I'm facing is I'm not getting all the comments. It's end output is like this:
enter image description here
One of the solution through which I'm able to get all comments if using limit like this:
https://graph.facebook.com/post_id/comments?access_token=XXX&limit=1000
This solved my problem since I had only 50+ comments. Still looking for more better solution.

page_fans_city returning no results from Graph API

I'm trying to get access to the page_fans_city edge from the Facebook Graph API.
I am using the following query:
https://graph.facebook.com/v2.5/StrandTowerHotel/insights/page_fans_city/lifetime
For some reason though it keeps returning no data when I am using the Graph API explorer.
note: I am an admin/owner of the page
Whats interesting though is that if I just query https://graph.facebook.com/v2.5/StrandTowerHotel/insights/ then I get all the other metrics results returned but "page_fans_city" is not in the results.
I have read through and tried the following solutions already posted on stack overflow but they don't seem to solve the issue.
Getting number of people who like a page on facebook by city
Facebook PHP Graph API not returning complete data
facebook: permanent Page Access Token?
Many thanks in advance for any help you can give me
After much searching and bug fixing it ended up being the facebook api was just having issues. now working perfectly :(

How to get all user's likes using facebook's graph API

How can I query facebook's graph API to retrieve all user's likes (not only pages but also photos and others)?
For instance, how could I get all the pictures a user has liked? Using facebook's search bar you can find them easily by clicking on "photos has liked".
I wrote a script that scrapes the page content and does that but it's not very efficient.
I have recently come accross a similar problem, maybe this helps you solve it.
https://graph.facebook.com/v2.5/{page_id}/feed?fields=likes.limit(1).summary(true)&since={start_date}&until={end_date}&access_token={access_token}
This will give you a list of all posts that received likes during the specified time period. If you manage to write a code summing up the following JSON path you got your sum for "all user's likes":
data[0].likes.summary.total_count
Not entirely sure is this is exactly what you were searching for, hope it helps you though - and if not you, someone else.
As for likes you can also use the same way to extract Shares and Comments:
Shares
https://graph.facebook.com/v2.5/{page_id}/feed?fields=shares&since={start_date}&until={end_date}&access_token=
Comments
https://graph.facebook.com/v2.5/{page_id}/feed?fields=comments.limit(1).summary(true)&since={start_date}&until={end_date}&access_token=
Best regards
There isn't to my knowledge any way to get this from the API without grabbing every type of response from the API and then sorting through for likes. Facebook search bar uses an internal API different from the Graph API.

Facebook API Photo's SharedPosts

I'm trying to get the /sharedposts edge of a photo.
This link works in the browser:
https://www.facebook.com/shares/view?id=10152429679154254
And when I query the API for 10152429679154254, I get the info about it along with likes and comments, but there are no shares.
The API reference suggests that objectid/sharedposts should work, but when I do that I get an empty set...
Any ideas?
Looks like facebook has a bug report for this and is working through all the comments. Might find some helpful info here - https://developers.facebook.com/bugs/1404733043148335/