Reputation: 1983
I'd like to get the details for an individual post by the logged in user - specifically, the number of likes it's collected.
Using the Javascript API, I've got a working app ID and can login a user and get their basic info. To get info about a specific object, I think it should be:
FB.api('/1234567890_2345678901', function(response) { ...
Where the first part of the number is the user ID and the second part after the underscore is the ID of the post.
However it always returns the same error for every post ID I try:
Unsupported get request. Object with ID ... does not exist, cannot be loaded due to missing permissions, or does not support this operation.
I cannot find anything in the docs about getting details for an object. I'm not sure what additional permissions would be needed. The app control panel has no features for adding individual permissions or finding out what they would be.
Upvotes: 0
Views: 213
Reputation: 73984
You are not supposed to get any data of users who did not authorize your App. If that ID belongs to a post on another users wall, you can´t get access to it. That´s what the error message tells you - you are missing the permission to access it.
Try with an ID that belongs to a post of the currently logged in users wall and it will work. You need the user_posts
permission, of course. For example: http://www.devils-heaven.com/facebook-javascript-sdk-login/
Upvotes: 1