为什么我的Facebook AppInviteDialog的请求没有被目标接到朋友? [英] Why is my Facebook AppInviteDialog request not being received by target friend?

查看:849
本文介绍了为什么我的Facebook AppInviteDialog的请求没有被目标接到朋友?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总之:一切都似乎是工作在客户端,但没有收到任何为Facebook好友的目标。

In short: Everything seems to be working on the client side, but nothing received for the Facebook target friend.

这些是code和截图的详细步骤:

These are the detailed steps with code and screenshots:

AppInviteContent content = new AppInviteConent.Builder()
    .setApplinkUrl("App link url created via the Facebook AppLink creator tool")
    .setPreviewImageUrl("http://www.redacted.com/previewImage.png")
    .build();

appInviteDialog.show(this, content);

这导致一个对话框被显示的链接的一个preVIEW到应用的安装,并且在顶部进入的消息的选项:

This results in a dialog being shown with a preview of a link to the install of the app, and the option of entering a message at the top:

我然后点击下一步,选择一个或更多的朋友,点击右上角的发送按钮:

I then click next, select one or more friends and click the top right Send button:

结果是一个看似成功的发送:

The result is a seemingly successful send:

我连着一个回调,以及以确保它实际上是一个成功发送:

I attached a callback as well to make sure it was actually a successful send:

appInviteDialog.registerCallback(facebookCallbackManager, new FacebookCallback<AppInviteDialog.Result>() {
    @Override
    public void onSuccess(AppInviteDialog.Result result) {
    Log.d(TAG,"onSuccess result = "+ result.getData().toString()); 
    }

    @Override
    public void onCancel() {}

    @Override
    public void onError(FacebookException e) {
        Log.d(TAG,"onError message = "+ e.getMessage());
    }
});

这打印出的onSuccess结果=包[{didComplete = 1}]

This prints out "onSuccess result = Bundle[{didComplete=1}]"

预期结果:朋友收到通知。
实际结果:朋友收到什么

Expected result: Friend receives a notification. Actual result: Friend receives nothing.

一些详细信息可能会有所帮助:

Some more information that might be helpful:


  • 应用是仅适用于Android。

  • 通知没有任何平台包括Facebook Android应用上收到的。

  • 应用程序链接的网址已被证实通过点击它在Facebook的Andr​​oid应用程序的工作。 (它创建链接到谷歌弹出Play商店)

  • 单点登录已启用,用户登录,虽然根据Facebook上的AppInviteDialog文件不应该是必要的。

  • 与尚未有授权的应用目标用户尝试这样做,也有网友认为已经安装了该应用。相同的结果。

  • 我使用Facebook SDK版本4.0.0是

这是令人沮丧,因为一切似乎确定,也没有办法(据我所知),以调试这个问题。

It's frustrating because everything seems OK, and there is no way (that I know of) to debug this problem.

我希望有人能帮助我,或点我在正确的方向。

I hope someone can help me or point me in the right direction.

感谢您!

推荐答案

好吧,原来一切都很好,工作毕竟。我的错误是在假设没有安装该应用程序,并没有授权应该产生一个推送通知的应用程序。

Ok, turns out everything was working fine after all. My mistake was in assuming not having the app installed, and not having the app authorized should generate a push notification.

创建一个新的测试用户,使用了未当前安装的应用程序的设备,并从来没有被授权与用户的应用程序后。

After creating a new test user, using a device where the app was not currently installed and the app NEVER having been authorized with the user.

因此​​,这里的关键是,否推送通知将是否安装了应用程序在目标设备上生成的即使用户没有授权的应用程序previously 。另外,貌似,如果用户已授权应用程序previously ,即使是在某个时候删除它,它也不会生成通知。

So the key here is that no push notification will be generated if the app is installed on the target device, even if the user has not authorized the app previously. Also, seemingly, if the user has authorized the app previously, even if it was removed it at some point, it also will not generate a notification.

所以,如果你想测试这一点,创建一个全新的测试用户并登录您要测试的平台上的Facebook应用程序,并确保应用程序不是在设备上安装。

我觉得还是应该生成安装尽管应用程序的通知,因为多个用户可能使用相同的设备,但是这就是它似乎是现在。

I think it should still generate a notification despite app being installed, because multiple users might be using the same device, but that's how it seems to be right now.

在这里我要离开这个万一有人在今后类似的问题。

I'll leave this here in case anyone has a similar problem in the future.

很长很精彩!

这篇关于为什么我的Facebook AppInviteDialog的请求没有被目标接到朋友?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆