Android Facebook SDK 4.0.1:如何获取从AppInviteDialog发回的邀请数

时间:2015-04-10 14:57:22

标签: android facebook

有人知道是否有办法获得从新的FB AppInviteDialog发回的邀请数量?我能够获得AppInviteDialog.Result,但它似乎不包含任何有用的信息。

这是我的代码:

public static void openDialogInvite(final Activity activity)
{
    String appLinkUrl, previewImageUrl;

    appLinkUrl = "your app link url";
    previewImageUrl = "https://www.example.com/my_invite_image.jpg";

    if (AppInviteDialog.canShow())
    {
        AppInviteContent content = new AppInviteContent.Builder()
                .setApplinkUrl(appLinkUrl)
                .setPreviewImageUrl(previewImageUrl)
                .build();

        AppInviteDialog appInviteDialog = new AppInviteDialog(activity);
        appInviteDialog.registerCallback(sCallbackManager, new FacebookCallback<AppInviteDialog.Result>()
        {
            @Override
            public void onSuccess(AppInviteDialog.Result result)
            {
            }

            @Override
            public void onCancel()
            {
            }

            @Override
            public void onError(FacebookException e)
            {
            }
        });

        appInviteDialog.show(content);
    }
}

0 个答案:

没有答案