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

Publish album

Roman Kushnarenko edited this page Oct 16, 2014 · 1 revision

Create new album.

Initialize callback listener:

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

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

Build album for publishing:

// create Album instance and add some properties
Album album = new Album.Builder()
  .setName("Album name")
  .setMessage("Album create by #android_simple_facebook sample application")
  .build();

Create album:

mSimpleFacebook.publish(album, onPublishListener);
Clone this wiki locally