android - "Dialog failed with unknown"错误响应。 Facebook 应用程序邀请,在切换 fb 帐户时

标签 android facebook facebook-app-invites

我在 Android facebook 应用程序邀请中遇到错误。一切正常。我从 Facebook 切换帐户,现在我收到此错误。

if(AppInviteDialog.canShow()) {
                AppInviteContent content = new AppInviteContent.Builder()
                        .setApplinkUrl(VPPreferences.getString(VPPreferencesKeys.INVITE_SCREEN_URL_FOR_FB, ""))
                        .setPreviewImageUrl(getString(R.string.invite_fbimage_url))
                        .build();


                AppInviteDialog appInviteDialog = new AppInviteDialog(this);
                 sCallbackManager = CallbackManager.Factory.create();

                appInviteDialog.registerCallback(sCallbackManager, new FacebookCallback<AppInviteDialog.Result>() {
                    @Override
                    public void onSuccess(AppInviteDialog.Result result) {
                        ToastNotificationUtil.showMessageToast(InviteSelectorScreen.this, getString(R.string.invite_succ));
                    }

                    @Override
                    public void onCancel() {
                        ToastNotificationUtil.showMessageToast(InviteSelectorScreen.this, "Invite canceled");

                    }

                    @Override
                    public void onError(FacebookException e) {
                        ToastNotificationUtil.showMessageToast(InviteSelectorScreen.this, "Invite failed ");

                    }
                });

                appInviteDialog.show(content);
            }

最佳答案

引自Facebook Developers他们的政策发生了重大变化。

As of November 7, 2017, link customization is available however the link must be owned by the posting page and a page access token is required.

To verify ownership, check the ownership_permissions{can_customize_link_posts} field on the URL node. You must call this endpoint before posting new links.

Without this step, custom link page posts will not work for un-scraped links. See our Link Ownership Guide for more information.

For versions 2.10 and lower, picture, name, thumbnail, and description are deprecated. caption is deprecated for all versions.

请转到给定链接并更改检查 URL 节点上的 ownership_permissions{can_customize_link_posts} 字段。

希望对你有帮助

关于android - "Dialog failed with unknown"错误响应。 Facebook 应用程序邀请,在切换 fb 帐户时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48144834/

相关文章:

android - 在另一个布局中包含布局

android - [Android,Facebook,Infer]Too many open files about infer error

android - 使用 JSONObject 填充 Listview 内的 Listview 绑定(bind)

android - 如何正确处理 Intent ?

android - 发布已签名的 Android 应用程序,Google Plus 登录和 Google map 无法正常工作

android - 在 Android 中的 Facebook 登录期间仅获取 jsonObject 中的 ID 和名称

iphone - iPhone 中的 Facebook Graph API 在 2 月 6 日更改后无法使用

android - Facebook App Invites 已弃用

ios - App Invites 已弃用