0

Ok code-heads, riddle me this... I'm harvesting likes off posts, and I get some weird errors from the API. As an example, this post:

https://www.facebook.com/10151854248210966 (the post)

https://graph.facebook.com/likes?id=10151854248210966 (the graph call for likes)

returns a "GraphMethodException" - no idea why. However, The very next post:

https://www.facebook.com/10151780170490966 (the post)

https://graph.facebook.com/likes?id=10151780170490966 (the graph call for likes)

Spits out all the likes I can handle. I've noticed that some posts do this, and I simply can't figure it out. Any ideas and ways to fix it? If I pop the likes window, the likes are there, so why doesn't Graph API return them?

2
  • Not everything is public in facebook! Commented Mar 29, 2014 at 21:18
  • Sahil, everything that doesn't require a token IS public. My question was why one call returns data and the other, near identical call is returning the exception. Commented Apr 2, 2014 at 16:12

1 Answer 1

1
  1. check this link with different user you cant access this page beacause post with this id 10151854248210966 is private and not public..

if you want to access any not public object then you need to pass with access token

https://www.facebook.com/10151854248210966?access_token="{token}"

Facebook Access Token

and this post below is public so you can make request

https://www.facebook.com/10151780170490966

beacause is public

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks very much! Any idea how to tell if a post is public or private other than the error?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.