Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.

Publish like

Roman Kushnarenko edited this page Oct 29, 2014 · 2 revisions

Initialize callback listener:

OnPublishListener onPublishListener = new OnPublishListener() {
	@Override
	public void onComplete(String postId) {
		Log.i(TAG, "Published successfully");
	}

	/* 
	 * You can override other methods here: 
	 * onThinking(), onFail(String reason), onException(Throwable throwable)
	 */
};

Build like:

Like like = new Like.Builder().build();

Publish score:

String postId = ... ;
mSimpleFacebook.publish(postId, like, onPublishListener);

And, the result is:

Published like

Clone this wiki locally