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

Get posts

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

Initialize callback listener:

OnPostsListener onPostsListener = new OnPostsListener() {			
	@Override
	public void onComplete(List<Post> posts) {
		Log.i(TAG, "Number of posts = " + posts.size());
	}
	
	/* 
	 * You can override other methods here: 
	 * onThinking(), onFail(String reason), onException(Throwable throwable)
	 */		
};

Get all posts and feeds that are shown on my wall:

mSimpleFacebook.getPosts(onPostsListener);

Get all posts and feeds that are shown specific entity wall:

  • Profile
  • Event
  • Group
  • Page
String entityId = ...;
mSimpleFacebook.getPosts(entityId, onPostsListener);

You can filter and get only links, statuses, posts or tagged by using:

String entityId = ...;
mSimpleFacebook.getPosts(entityId, PostType.STATUSES, onPostsListener);
Clone this wiki locally