Facebook邀请无法在我的应用程序中运行

时间:2018-03-21 12:06:36

标签: java android facebook

我使用的Facebook版本是 sdk 4.0.0

我会尝试使用以下代码:

 try {

                        String appLinkUrl, previewImageUrl;
                        appLinkUrl = "Har is my google play/Store Url";
                        previewImageUrl = "hear is my app logo url URL";


                        AppInviteContent content = new AppInviteContent.Builder()
                                .setApplinkUrl(appLinkUrl)
                                .setPreviewImageUrl(previewImageUrl)
                                .build();

                        //AppInviteDialog.show(getActivity(), content);

                        AppInviteDialog appInviteDialog = new AppInviteDialog(activity);
                        appInviteDialog.registerCallback(callbackManager, new FacebookCallback<AppInviteDialog.Result>() {
                            @Override
                            public void onSuccess(AppInviteDialog.Result result) {
                                Log.d("Facebook Result",result.toString());
                            }

                            @Override
                            public void onCancel() {
                                Log.d("Facebook Result","Cancel");
                            }

                            @Override
                            public void onError(FacebookException error) {
                                Log.d("Facebook Error",error.toString());
                            }
                        });
                        appInviteDialog.show(content);

                    } catch (Exception e) {
                        Log.d("Error Invetation", e.toString());
                    }

但是听到没有打开用户邀请的任何对话框也没有显示任何错误 未显示任何Logcat消息

0 个答案:

没有答案