简体   繁体   English

Facebook Android SDK未记录购买事件

[英]Facebook Android SDK not logging purchase events

I implemented the Facebook Android SDK (v5.1.0) into my app for analytics and to eventually run facebook ads for the app. 我在我的应用程序中实现了Facebook Android SDK(v5.1.0)进行分析,并最终为该应用程序运行了Facebook广告。 In FB's "App dashboard" developer settings I have it set to "Log in-app events automatically". 在FB的“应用程序仪表板”开发人员设置中,我将其设置为“自动登录应用程序内事件”。 If I toggle this off, I can't toggle it back on. 如果将其关闭,则无法将其重新打开。 Once I click save, the page refreshes and it's back to off. 单击保存后,页面将刷新,并返回到关闭状态。 The only way I've found to turn it back on is from the FB Analytics Settings page "Log in-app purchase events automatically on Android". 我发现重新打开它的唯一方法是从FB Analytics设置页面“在Android上自动登录应用内购买事件”。 This will then also turn the switch back on in the app dashboard developer settings. 然后,这还将在应用程序仪表板开发人员设置中重新打开该开关。 I'm using the newer Google Play Billing Manager library code for in-app purchases. 我正在使用更新的Google Play结算管理器库代码进行应用内购买。 Could this be the problem? 这可能是问题吗?

However, I've never seen any purchase events actually come through under FB Analytics "events or "event debugging". 但是,我从未见过任何购买事件实际上是在FB Analytics“事件或”事件调试”下发生的。

I've tried manually logging purchase events with 我尝试过手动记录购买事件

logger.logPurchase(BigDecimal.valueOf(Double.valueOf(price)), null);

but that hasn't shown anything either. 但这也什么也没显示。

Other events are showing up just fine in the thousands, and there's definitely purchases being made. 其他事件在数千个中显示都很好,并且肯定有购买。 In fact, during testing, my own events aren't showing up in event debugging (it should be obvious which are mine as I've increased the app version in this unreleased build). 实际上,在测试过程中,我自己的事件没有显示在事件调试中(很明显,这是我的事件,因为我在未发布的版本中增加了应用程序版本)。

Anyone else run into this? 还有其他人遇到吗?

Well it turns out I had overlooked something pretty critical. 好吧,事实证明我忽略了一些非常关键的事情。 I don't know how most events worked except purchases, but eventually all logging stopped. 除了购买外,我不知道大多数事件如何工作,但最终所有记录都停止了。 Couldn't figure out what it was so I started with the guide from the beginning. 无法弄清楚是什么,所以我从一开始就从指南开始。 I forgot to add the android.permission.INTERNET permission to the manifest! 我忘了在清单中添加android.permission.INTERNET权限! All is working as expected now, including purchase logging! 现在一切都按预期工作,包括购买记录!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM