简体   繁体   中英

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. In FB's "App dashboard" developer settings I have it set to "Log in-app events automatically". 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". 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. Could this be the problem?

However, I've never seen any purchase events actually come through under FB Analytics "events or "event debugging".

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! All is working as expected now, including purchase logging!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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