Using share dialog in Android Facebook SDK. How to know is user actually shared or cancelled sharing activity?

前端 未结 6 2111
無奈伤痛
無奈伤痛 2021-01-11 09:41

I have added sharing functionality to Android app as described here https://developers.facebook.com/docs/android/share-dialog/#setup

But I have noticed that if user

6条回答
  •  伪装坚强ぢ
    2021-01-11 10:07

    @Override
    public void onComplete(FacebookDialog.PendingCall pendingCall, Bundle data) {
        if (data.getString("com.facebook.platform.extra.COMPLETION_GESTURE").equals("cancel"))
            return;
    }
    

    the value of data.getString("com.facebook.platform.extra.COMPLETION_GESTURE") is "post" when the user did post on Facebook.

提交回复
热议问题