Scott H Tech Facebook Analytics support v4a?

Hi Scott,

A very quick question; does the Facebook analytics plugin support “plugin.facebook.v4a”?

From your documentation, we need to require facebook before requiring your plugin.

[lua]

local facebook = require(“plugin.facebook.v4”)

local facebookAnalytics = require “plugin.facebookAnalytics”

facebookAnalytics.init()

[/lua]

Would it work with?

[lua]

local facebook = require( “plugin.facebook.v4a” )

[/lua]

Not really an issue either way as I am not using Facebook,  I was just trying to be the most current.

Cheers,

Craig

Not speaking for Scott. He might have a different answer, but the only difference between v4 and v4a is how the plugin initializes on Android.

I would defer initializing his analytics plugin until after you’ve confirmed that the v4a plugin has initialized.

Rob

Yes it supports v4a

Awesome. Thanks Scott and Rob. Craig

Hi Scott,

Rob appears to be right again.  If I have the initializer straight after the facebook require then I get a black screen, but if I use the code below then there are no problems.

[lua]

local facebook = require( “plugin.facebook.v4a” ) 

local facebookAnalytics = require “plugin.facebookAnalytics”

local function facebookListener( event )

    if ( “fbinit” == event.name ) then

        facebookAnalytics.init()

    end

end

facebook.init( facebookListener )

[/lua]

Craig

Good to know