I\'m learning how to use the Facebook SDK, and i like to put a like button to the application i\'m testing on it, and unfortunately i\'m doing something wrong, so can you please
Get the id of the post that you want to like and store it in fbPostId
.
Then, inside the onClickHandler of your like button, put the following code snippet :
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);