I want to implement "Like" option in my Android app, but I don't know which Request to use.
I have a valid facebook Session opened and the ID post I want to like.
How can I implement this function?
Thanks
This documentation describes how to integrate your Android app with Facebook to build engaging social apps by using the Facebook SDK for Android. To learn more about using Facebook development tools, see App Development. The current version of the Facebook SDK for Android is version 15.0.
The Facebook SDK is a set of software components that developers can include in their mobile app to understand how people use the app, run optimized marketing campaigns and enable Facebook login and social sharing.
Select the App you want to upgrade (you might have access to multiple apps) Click Settings > Advanced. Select the latest version under the Upgrade API Version section for both “Upgrade All Calls” and “Upgrade Calls for App Roles” Save.
I found a solution.
To like post I've implemented a simple POST request using likes connection of facebook post id.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With