I am building a Facebook app in which I want to use the "like" functionality. When the user clicks on the Like button of a status then it should be updated in the Facebook database. Is there any URL or is there any method in the Facebook SDK to do it, and for comments as well?
Asked
Active
Viewed 481 times
2 Answers
2
Got the answer here Android How to like a post with facebook 3.0 sdk , the second one....
Request likeRequest = new Request(Session.getActiveSession(), fBPostId + "/likes", null, HttpMethod.POST, new Request.Callback() {
@Override
public void onCompleted(Response response) {
Log.i(TAG, response.toString());
}
});
Request.executeBatchAndWait(likeRequest);
0
Yes, You can create a like
on a Post by making a HTTP POST request to
POST_ID/likes
with the publish_stream
extended permission. If the write is successful, then it will return true
.

Anvesh Saxena
- 4,458
- 2
- 23
- 30
-
i am new to android development, can you explain in detail?? – Saad May 20 '13 at 10:23
-
Sorry, I don't have experience in android. But as far as documentation says, you might have to use [this](https://developers.facebook.com/docs/reference/android/3.0/Request) and create HTTP `POST` method to `POST_ID/likes` graphPath and passing along `session`. – Anvesh Saxena May 20 '13 at 10:31