Search in sources :

Example 6 with FacebookCallback

use of com.facebook.FacebookCallback in project facebook-android-sdk by facebook.

the class JoinAppGroupDialog method registerCallbackImpl.

@Override
protected void registerCallbackImpl(final CallbackManagerImpl callbackManager, final FacebookCallback<Result> callback) {
    final ResultProcessor resultProcessor = (callback == null) ? null : new ResultProcessor(callback) {

        @Override
        public void onSuccess(AppCall appCall, Bundle results) {
            callback.onSuccess(new Result(results));
        }
    };
    CallbackManagerImpl.Callback callbackManagerCallback = new CallbackManagerImpl.Callback() {

        @Override
        public boolean onActivityResult(int resultCode, Intent data) {
            return ShareInternalUtility.handleActivityResult(getRequestCode(), resultCode, data, resultProcessor);
        }
    };
    callbackManager.registerCallback(getRequestCode(), callbackManagerCallback);
}
Also used : AppCall(com.facebook.internal.AppCall) FacebookCallback(com.facebook.FacebookCallback) Bundle(android.os.Bundle) CallbackManagerImpl(com.facebook.internal.CallbackManagerImpl) Intent(android.content.Intent) ResultProcessor(com.facebook.share.internal.ResultProcessor)

Aggregations

Bundle (android.os.Bundle)6 FacebookCallback (com.facebook.FacebookCallback)6 GraphRequest (com.facebook.GraphRequest)4 GraphResponse (com.facebook.GraphResponse)4 Intent (android.content.Intent)3 JSONObject (org.json.JSONObject)3 FacebookException (com.facebook.FacebookException)2 AppCall (com.facebook.internal.AppCall)2 CallbackManagerImpl (com.facebook.internal.CallbackManagerImpl)2 ResultProcessor (com.facebook.share.internal.ResultProcessor)2 JSONException (org.json.JSONException)2 Bitmap (android.graphics.Bitmap)1 Uri (android.net.Uri)1 View (android.view.View)1 Button (android.widget.Button)1 TextView (android.widget.TextView)1 AccessToken (com.facebook.AccessToken)1 Profile (com.facebook.Profile)1 ProfileTracker (com.facebook.ProfileTracker)1 CollectionMapper (com.facebook.internal.CollectionMapper)1