4
votes

I stumbled upon a problem with the Facebook Graph API today. I simply tried to get all the comments from a specific post: https://www.facebook.com/IGABerlin2017/posts/396682000447623

But the Graph API Explorer returns only one comment: /167505403365285_396682000447623/comments

Is this a privacy issue? Is there any way for a user to set his or her comments invisible for public API calls?

I even requested all the available permissions when generating the access token... well, without success. This is a public page (and post) and there shouldn't be any problems with permissions...

Thanks for any help in advance.

2
Try to look at this answer, seems really similar: stackoverflow.com/questions/4393137/…Alessandro Gabrielli

2 Answers

1
votes

It's not a facebook API bug. The main cause is because you can't even access 'https://graph.facebook.com/wauwaumax' to get basic profile info, you would get error message instead:

{ "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } }

It's possible when user turn the platform off on app settings.

Before turn it off:

enter image description here

After turn it off:

enter image description here

Any third party apps including Graph API explorer would no longer able to access user data via any API call after user turn it off.

0
votes

comments are public when you comment on a public post. May I see the code you're using? Or is it just an attempt with the graph explorer? Anyhow I've seen this answer on SO that might help Retrieve Facebook Post Comments Using Graph API

EDIT: I have managed to do this with FQL on the Graph Explorer. It seems to works properly with the following

SELECT post_id FROM stream WHERE source_id=FAN_PAGE_ID AND comments.count > 0

You'll see the posts listed by id number. Just click to see likes and comments for each post. If you prefer the graph you can simply write the comment ID with GET to see all comments and likes: Alternatively you can write

POST_ID_NUMBER/comments/data

to get comments only. I hope this helps.