I am trying to crawl the comments left on my own website.
With a get request like this: http://graph.facebook.com/comments/?ids=[url]
I have no problem, but If i try to send a post request with the same param facebook replies:
"An access token is required to request this resource"
Someone knows why? And how to obtain such token for something that is already public (comments)?
I’m adding another answer in response to your comment: “I don’t want to publish a comment. I jsut want to read those comments with a post request”. A POST request by default is how you publish new comments. To just view the comments using a POST request you have to tell it to treat it as a GET request by adding
method=getto the query string. So POST to:And make your post body:
(Also be aware that this
method=getworks here because Facebook implemented that as an option. In general, HTTP doesn’t supply that option.)