nov / fb_graph

This gem doesn't support FB Graph API v2.0+. Please use fb_graph2 gem instead.
MIT License
1.04k stars 191 forks source link

Likes returns an empty array #340

Closed eladmeidar closed 10 years ago

eladmeidar commented 11 years ago

App uses the "user_likes" permission but the #likes method on FbGraph::User instance is returning an empty array.

Turns out the user had the privacy settings for "likes" as private, after changing it to "public" - the expected result was returned.

Is there something we can do about it?

tmlee commented 11 years ago

@eladmeidar problem lies in the user's privacy permission when fetching user_likes; if its not an empty array, what is your expectation for the returned object?

eladmeidar commented 11 years ago

@tmlee honestly? i think that if you try to access some of the user information that isn't public / available for you - you should get an exception - just like when you are trying to do an action that isn't allowed by the permissions you have.

tmlee commented 11 years ago

Would think that fbgraph could throw an exception if making a regular curl to Facebook API returns an exception as well given that situation. Is that situation the same as when a user tries to access a friend's like that is no longer public to them via the friends_likes permission?

eladmeidar commented 11 years ago

Exactly.

tmlee commented 11 years ago

Right, I've tried to replicate it via Facebook API call to be able to get an exception thrown but wasn't able to do so. Maybe you can point me on how can i get that?