use of com.androidquery.callback.AbstractAjaxCallback in project androidquery by androidquery.
the class AjaxAuthActivity method auth_facebook.
public void auth_facebook() {
FacebookHandle handle = new FacebookHandle(this, APP_ID, PERMISSIONS) {
@Override
public boolean expired(AbstractAjaxCallback<?, ?> cb, AjaxStatus status) {
//custom check if re-authentication is required
if (status.getCode() == 401) {
return true;
}
return super.expired(cb, status);
}
};
String url = "https://graph.facebook.com/me/feed";
aq.auth(handle).progress(R.id.progress).ajax(url, JSONObject.class, this, "facebookCb");
}
Aggregations