I am using facebook android sdk v3.5 in my messaging app. For statistics, I need to keep track of whether the message was posted successfully or not. However, I always get null by getting FacebookDialog.getNativeDialogCompletionGesture in onActivityResult()
The code I use is very standard.
Code for calling facebook sharing dialog:
private void sendToFacebook() { if (!FacebookDialog.canPresentShareDialog(getActivity().getApplicationContext(), FacebookDialog.ShareDialogFeature.SHARE_DIALOG)) { return; } FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(getActivity()) .setName(getString(R.string.refer_friend_facebook_name)) .setDescription(getString(R.string.refer_friend_facebook_description)) .setCaption(getString(R.string.facebook_app_name)) .setLink(getString(R.string.web_endpoint)) .setPicture(getString(R.string.facebook_picture_90)) .build(); activity.getFacebookUiHelper().trackPendingDialogCall(shareDialog.present()); }
The code that I use to process the result of the call:
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { facebookUiHelper.onActivityResult(requestCode, resultCode, data, new FacebookDialog.Callback() { @Override public void onError(FacebookDialog.PendingCall pendingCall, Exception error, Bundle data) {
The facebook sdk documentation states that:
FacebookDialog.getNativeDialogCompletionGesture - is available only if the user has logged in to your application using Facebook and executed it. The meaning is "post" or "cancel."
But I canβt understand what exactly they mean by this phrase.
source share