Mateusz Mazurek
Mateusz Mazurek

Reputation: 101

FQL Getting comments without access_token


Main question: Is it possible to get comments using FQL without access_token?

Description:

At first I have added comment from my personal account:
https://api.facebook.com/method/comments.add?text=test&xid=some_xid&access_token=user_access_token&format=json

----------
Btw. In response I got "685513" - what does this number mean?
----------

Then I'm trying to read comments using FQL, so:
https://graph.facebook.com/fql?q=select%20text%20from%20comment%20where%20xid=%22same_xid_as_above%22&access_token=some_access_token

This is working ok. Result:

{"data": [{"text": "test"}]}

But when I call same URL without access_token param it returns empty data object:

{"data": [ ]}

I know that I can get token for my application using app id+app secret and then use it with API, but my question is if I am able to get comments without any access_token.

Regards, Mateusz.

Upvotes: 1

Views: 1051

Answers (1)

mrtom
mrtom

Reputation: 2156

  • No, you can't get user data from the Graph or REST APIs without an access token. That would mean anyone could get at the comment, which would be an invasion of your privacy
  • The number you get back is the ID of the comment

https://developers.facebook.com/docs/reference/rest/comments.add/ gives a good explanation of what permissions are needed and what the response types are

Upvotes: 1

Related Questions