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

General get

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

You can get anything from facebook by using this generic function. By using this method, you should be familiar with Graph API.

String entityId = ... ;
String edge = ... ;
OnActionListener<T> onActionListener = ... ;
mSimpleFacebook.get(entityId, edge, onActionListener);

Example:

If you want to get music that you like, then the graph path should be me/music and the expeted result is of type Page as explained in this document.

Get my music:

mSimpleFacebook.get("me", "music", null, new OnActionListener<List<Page>>() {
	
	@Override
	public void onComplete(List<Page> response) {
		Log.i(TAG, "Number of music pages I like = " + response.size());
	}

});

Note: This method is expensive since it uses reflection. It also supports only List and entities that have create(GraphObject) method.

Clone this wiki locally