开发者

Cannot Facebook "Like" with Graph API's /OBJECT_ID/likes

I'd like to implement a like button in my Android app. The Graph API doc sais publishing likes can be done with /OBJECT_ID/likes.

/OBJECT_ID/likes

Like the given object (if it has a /likes connection)

However if i implement this:

Bundle par = new Bundle(); 
par.putString("access_token", ACCESS_TOKEN);
facebook.request(APP_ID + "/like开发者_Go百科s", par, "POST");

it just does nothing but returns an empty (data content) JSON array. (publish_stream permission is given.)

APP_ID is my app's FB id, and i guess it'd be the OBJECT_ID so i don't understand. How can i implement then a Like button?


You cannot force users to like your application or your fan page (due to spamming reasons). The only way you can get them to like your page/app is embedding the like fbml code or iframe in a web view. That documentation is in place to like a friends wall post or comment or photo, as those are the types of items you can like for a user, in case for example you were writing a Facebook client. If that is what you are trying to do, don't send the app_id as you are doing, but send the post id of the users post.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜