Android How to like a message with facebook 3.0 sdk

I want to implement the How option in my Android app, but I donโ€™t know which request to use.

I have a valid facebook session and message id that I like.

How can I implement this feature?

thanks

+6
source share
2 answers

I have found a solution.

I liked the post, I implemented a simple POST request using a simplex facebook id connection.

This is the code:

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); 
+13
source

A quick search ( 1 , 2 , 3 ), apparently, indicates that it is impossible to directly "resemble" things as a user using the Graph API for security / spam reasons. One of the recommended alternatives has traditionally been to show the Facebook-controlled โ€œLikeโ€ button in the WebView and incorporate it into your application.

Recently, however, the Facebook Developer's Guide has provided one possible solution for how you can implement โ€œlikeโ€ functionality in your application when it comes to posting stories as a user, although this is not exactly the same as you, seems to ask.

0
source

All Articles