Facebook Analytics

Hi Scott, 

Thanks for a plugin! 

My question is: can I use option “Log In-App Purchase Events Automatically on Andoird” ? Does this feature work for Corona + your plugin?

I don’t think so. I have to use corona’s facebook sdk so whichever version of the sdk they use I am stuck with. They use 4.16 I believe, I have not asked them in a while but don’t believe they have made any changes in a while. According to the facebook docs version, 4.27 is required. So there is not much I can do.
I do have a manual way
facebookAnalytics.logPurchase(cost, currency)
https://scotth.tech/plugin-facebookAnalytics

Hello

Help me please

http://joxi.net/krDJZ98HER1ed2

What have I to write in the field of “Main class”?

I don’t find any information at Corona SDK Docs

com.ansca.corona.CoronaActivity

Hi Scott

FacebookAnalytics broke on Android after Corona updated the Facebook SDK recently.

When I build (2019.3552) for android my app crashes when calling facebookAnalytics.init().

Same code used to build fine and I did no changes.

Here is the stack trace:

analytics.lua:122: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object referenceJava Stack Trace: com.facebook.FacebookSdk.publishInstallAsync(FacebookSdk.java:619) com.facebook.appevents.AppEventsLoggerImpl.activateApp(AppEventsLoggerImpl.java:113) com.facebook.appevents.AppEventsLogger.activateApp(AppEventsLogger.java:200) com.facebook.appevents.AppEventsLogger.activateApp(AppEventsLogger.java:209) plugin.facebookAnalytics.LuaLoader$init.invoke(LuaLoader.java:168) com.ansca.corona.JavaToNativeShim.nativeRender(Native Method) com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:220) com.ansca.corona.Controller.updateRuntimeState(Controller.java:382) com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:450) com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1625) com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380) -  stack traceback: [C]: in function 'init' /Users/qp/Workspace/components/network/analytics.lua:122: in function 'init' /Users/qp/Workspace/main.lua:157: in main chunk

This been fixed please use facebookAnalytics.init(facebookAppID)

@Scott_Harrison I paid for your plugin a few weeks ago.

In the iOS build, it works without problems
However, in the Android build, the build fails due to the following problems.
buildLog.txt (46.8 KB)
please check.

Did you use the plugin with any plugins?

@Scott_Harrison This is a list of plugins currently in use.

[“plugin.notifications.v2”]
[“CoronaProvider.native.popup.social”]
[“CoronaProvider.native.popup.activity”]
[“plugin.applovin.paid”]
[“plugin.appsflyer”]
[“plugin.facebook.v4”]
[“plugin.facebookAnalytics”]

try using plugin.facebook.v4a instead of v4