# Facebook Analytics

**URL:** <https://forums.solar2d.com/t/facebook-analytics/149423>\
**Category:** Corona Community Plugins\
**Created:** [December 24, 2016, 7:29am UTC](https://forums.solar2d.com/t/facebook-analytics/149423 "2016-12-24T07:29:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [December 24, 2016, 7:29am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/1 "2016-12-24T07:29:04Z")

</div>

Facebook Analytics

&nbsp;

[View and activate on the Corona Store](https://marketplace.coronalabs.com/plugin/facebook-analytics "External link")

This plugin allows you to log events and user info through facebook analytics for iOS and Android

[Documentation](https://scotth.tech/plugin-facebookAnalytics "External link")

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [January 14, 2017, 5:42am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/2 "2017-01-14T05:42:33Z")

</div>

added limitEventUsage

[https://scotth.tech/plugin-facebookAnalytics](https://scotth.tech/plugin-facebookAnalytics)

---

<div class="post-metadata">

**Author:** ![okko.hakola](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/o/ea666f/32.png) [@okko.hakola](https://forums.solar2d.com/u/okko.hakola)\
**Post date:** [February 4, 2017, 9:14pm UTC](https://forums.solar2d.com/t/facebook-analytics/149423/3 "2017-02-04T21:14:29Z")

</div>

Hi mr. Scott!

I love that you’ve made FB app events available for corona. However, there seems to be an issue with the build settings when building this for iOS. No problem with android. (I’m not yet using any events, just trying to build it with the plugin added to build settings).

_Feb 04 01:05:21.062 ERROR: Builder failed: /Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/libtemplate/Builder.lua:125: attempt to index local ‘attributes’ (a nil value)  
Feb 04 01:05:21.062 BUILD ERROR: There was a problem linking the app._

**Log:**

```
Feb 04 01:05:01.630 Using custom build id from app bundle: 00000 (AppSettings.lua) Feb 04 01:05:01.644 2017-02-04 13:05:01.630 Corona Simulator[18014:999929] logEvent: key: target Feb 04 01:05:13.861 BuildID: 589641fd179cc Feb 04 01:05:19.356 Using additional build settings from: build.settings Feb 04 01:05:19.400 Server dir name: facegame.app Server app name: facegame (local name: facegame) Feb 04 01:05:19.425 Building: Copying app resources Feb 04 01:05:19.426 Excluding specified files from build: excluding: Icon-\*dpi.png Feb 04 01:05:19.495 Contents of ZIP file from server: Feb 04 01:05:19.526 facegame.app/ facegame.app/embedded.mobileprovision facegame.app/MainWindow-iPad.nib/ facegame.app/MainWindow-iPad.nib/objects.nib Feb 04 01:05:19.542 facegame.app/MainWindow-iPad.nib/runtime.nib facegame.app/Default-568h@2x.png facegame.app/resource.car facegame.app/PkgInfo facegame.app/CoronaResources.bundle/ facegame.app/CoronaResources.bundle/widget\_theme\_android.png facegame.app/CoronaResources.bundle/widget\_theme\_onOff\_mask.png facegame.app/CoronaResources.bundle/widget\_theme\_android\_holo\_dark@4x.png facegame.app/CoronaResources.bundle/widget\_theme\_android\_holo\_light@2x.png facegame.app/CoronaResources.bundle/widget\_theme\_android\_holo\_light@4x.png facegame.app/CoronaResources.bundle/widget\_theme\_android\_holo\_light.png facegame.app/CoronaResources.bundle/widget\_theme\_onOff\_mask\_android\_holo.png facegame.app/CoronaResources.bundle/widget\_theme\_ios7@4x.png facegame.app/CoronaResources.bundle/widget\_theme\_ios7.png facegame.app/CoronaResources.bundle/widget\_theme\_ios@2x.png facegame.app/CoronaResources.bundle/widget\_theme\_android@2x.png facegame.app/CoronaResources.bundle/widget\_theme\_pickerWheel\_mask.png facegame.app/CoronaResources.bundle/Info.plist facegame.app/CoronaResources.bundle/widget\_theme\_android\_holo\_dark.png facegame.app/CoronaResources.bundle/widget\_theme\_ios7@2x.png facegame.app/CoronaResources.bundle/widget\_theme\_android\_holo\_dark@2x.png facegame.app/CoronaResources.bundle/widget\_theme\_ios.png facegame.app/\_CoronaSplashScreen.png facegame.app/Info.plist facegame.app/\_CodeSignature/ facegame.app/\_CodeSignature/CodeResources facegame.app/CoronaSDK3rdPartyLicenses.txt facegame.app/.build/ facegame.app/.build/plugin.CoronaSplashControl/ facegame.app/.build/plugin.CoronaSplashControl/lua/ facegame.app/.build/plugin.CoronaSplashControl/lua/lua\_51/ facegame.app/.build/plugin.CoronaSplashControl/lua/lua\_51/plugin/ facegame.app/.build/plugin.CoronaSplashControl/lua/lua\_51/plugin/CoronaSplashControl.lua facegame.app/.build/libtemplate/ facegame.app/.build/libtemplate/Defaults.lua facegame.app/.build/libtemplate/libtemplate.a facegame.app/.build/libtemplate/Builder.lua facegame.app/.build/libtemplate/build.lua facegame.app/.build/libtemplate/BuilderUtils.lua facegame.app/.build/plugin.facebookAnalytics/ facegame.app/.build/plugin.facebookAnalytics/libplugin\_facebookAnalytics.a facegame.app/.build/plugin.facebookAnalytics/metadata.lua facegame.app/MainWindow.nib/ facegame.app/MainWindow.nib/objects.nib facegame.app/MainWindow.nib/runtime.nib Feb 04 01:05:19.543 Building: Unpacking build from server Feb 04 01:05:20.917 Building: Adding plugins Feb 04 01:05:20.940 builder: buildOptions: { "dstDir":"/Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app", "dstName":"facegame", "dstPath":"/Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/facegame", "librarySearchPaths":["/Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/libtemplate"], "pluginsDir":"/Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build", "settings":{ "splashScreen":{ "enable":true, "image":"splash.png" }, "android":{ "facebookAppId":"1227917163910000", "usesPermissions":["android.permission.INTERNET"] }, "plugins":{ "plugin.CoronaSplashControl":{ "supportedPlatforms":{ "android":true, "iphone":true }, "publisherId":"com.coronalabs" }, "plugin.facebookAnalytics":{ "supportedPlatforms":{ "android":true, "iphone":true, "android-kindle":true }, "publisherId":"tech.scotth" } }, "iphone":{ "plist":{ "UILaunchImages":[{ "UILaunchImageOrientation":"Portrait", "UILaunchImageMinimumOSVersion":"8.0", "UILaunchImageSize":"{320, 480}", "UILaunchImageName":"Default" },{ "UILaunchImageOrientation":"Portrait", "UILaunchImageMinimumOSVersion":"8.0", "UILaunchImageSize":"{320, 568}", "UILaunchImageName":"Default-568h" },{ "UILaunchImageOrientation":"Portrait", "UILaunchImageMinimumOSVersion":"8.0", "UILaunchImageSize":"{768, 1024}", "UILaunchImageName":"Default-Portrait" },{ "UILaunchImageOrientation":"Portrait", "UILaunchImageMinimumOSVersion":"8.0", "UILaunchImageSize":"{375, 667}", "UILaunchImageName":"Default-667h" },{ "UILaunchImageOrientation":"Portrait", "UILaunchImageMinimumOSVersion":"8.0", "UILaunchImageSize":"{414, 736}", "UILaunchImageName":"Default-736h" },{ "UILaunchImageOrientation":"Portrait", "UILaunchImageMinimumOSVersion":"8.0", "UILaunchImageSize":"{414, 736}", "UILaunchImageName":"Default-736h" },{ "UILaunchImageOrientation":"Portrait", "UILaunchImageMinimumOSVersion":"9.0", "UILaunchImageSize":"{1024, 1366}", "UILaunchImageName":"Default-Portrait-1366" }], "LSApplicationQueriesSchemes":["fb","fbapi","fbauth2","fb-messenger-api","fbshareextension"], "UIPrerenderedIcon":true, "UIStatusBarHidden":false, "MinimumOSVersion":"8.0", "FacebookAppID":"1227917163910000", "UIApplicationExitsOnSuspend":false, "CFBundleIconFiles":["Icon.png","Icon@2x.png","Icon-167.png","Icon-60.png","Icon-60@2x.png","Icon-60@3x.png","Icon-72.png","Icon-72@2x.png","Icon-76.png","Icon-76@2x.png","Icon-Small.png","Icon-Small@2x.png","Icon-Small@3x.png","Icon-Small-40.png","Icon-Small-40@2x.png","Icon-Small-50.png","Icon-Small-50@2x.png"], "CFBundleURLTypes":[{ "CFBundleURLSchemes":["fb1227917163910000"] }] } }, "excludeFiles":{ "android":["Icon.png","Icon-Small-\*.png","Icon\*@2x.png"], "iphone":["Icon-\*dpi.png"] }, "orientation":{ "default":"portrait", "supported":["portrait"] } }, "tmpDir":"/var/folders/gb/sgb9kff117j1plr1s41xxkm40000gn/T/CLtmpGLHrM3", "verbose":0 } Feb 04 01:05:21.061 Analyzing plugins... Feb 04 01:05:21.061 Found native plugin: /Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/plugin.facebookAnalytics Done. Analyzing Lua plugins... Feb 04 01:05:21.062 +++ examining Lua plugin: /Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/plugin.CoronaSplashControl/lua/lua\_51/ Found Lua plugin: /Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/plugin.CoronaSplashControl/lua/lua\_51/ +++ examining Lua plugin: /Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/plugin.facebookAnalytics/lua/lua\_51/ Feb 04 01:05:21.062 ERROR: Builder failed: /Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/libtemplate/Builder.lua:125: attempt to index local 'attributes' (a nil value) Feb 04 01:05:21.062 BUILD ERROR: There was a problem linking the app. Check the console for more information. Feb 04 01:05:21.104 iOS build failed (12) after 20 seconds Feb 04 01:05:21.419 2017-02-04 13:05:21.418 Corona Simulator[18014:999929] logEvent: key: target 2017-02-04 13:05:21.418 Corona Simulator[18014:999929] logEvent: key: reason Feb 04 01:05:21.419 ERROR: Build Failed: There was a problem linking the app. Check the console for more information.

```

**build.settings**

```
-- -- For more information on build.settings see the Corona SDK Build Guide at: -- https://docs.coronalabs.com/guide/distribution/buildSettings -- settings = { plugins = { ["plugin.facebookAnalytics"] = { publisherId = "tech.scotth", supportedPlatforms = { iphone=true, android=true, ["android-kindle"]=true } }, ["plugin.CoronaSplashControl"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true }, }, }, splashScreen = { enable = true, image = "splash.png" }, orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait", }, }, excludeFiles = { -- Include only the necessary icon files on each platform iphone = { "Icon-\*dpi.png", }, android = { "Icon.png", "Icon-Small-\*.png", "Icon\*@2x.png", }, }, -- -- iOS Section -- iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-167.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPad Pro Portrait ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Portrait-1366", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{1024, 1366}" }, }, MinimumOSVersion = "8.0", UIApplicationExitsOnSuspend = false, FacebookAppID = "1227917163910000", CFBundleURLTypes = { { CFBundleURLSchemes = { "fb1227917163910000", } } }, -- Whitelist Facebook apps LSApplicationQueriesSchemes = { "fb", -- Needed for the facebook-v4.isFacebookAppEnabled() API "fbapi", "fbauth2", "fb-messenger-api", "fbshareextension" }, }, }, -- -- Android Section -- android = { usesPermissions = { "android.permission.INTERNET", }, facebookAppId = "1227917163910000", }, }

```

What might be wrong there?&nbsp;

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [February 4, 2017, 11:09pm UTC](https://forums.solar2d.com/t/facebook-analytics/149423/4 "2017-02-04T23:09:27Z")

</div>

Use an older version, corona has a bug in there newer builds.

---

<div class="post-metadata">

**Author:** ![okko.hakola](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/o/ea666f/32.png) [@okko.hakola](https://forums.solar2d.com/u/okko.hakola)\
**Post date:** [February 4, 2017, 11:24pm UTC](https://forums.solar2d.com/t/facebook-analytics/149423/5 "2017-02-04T23:24:29Z")

</div>

You could update the docs to mention that fb analytics replaces the coronas fb plugin.&nbsp;

Also, update this part:&nbsp;

publisherId = “com.scottrules44”, &nbsp;

Thanks for the help! Worked with build 3007

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [February 5, 2017, 3:01am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/6 "2017-02-05T03:01:30Z")

</div>

updated

---

<div class="post-metadata">

**Author:** ![okko.hakola](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/o/ea666f/32.png) [@okko.hakola](https://forums.solar2d.com/u/okko.hakola)\
**Post date:** [February 6, 2017, 8:59pm UTC](https://forums.solar2d.com/t/facebook-analytics/149423/7 "2017-02-06T20:59:30Z")

</div>

Hi again, Scott!

Is it possible to use this with corona’s facebook plugin?

&nbsp; &nbsp; &nbsp; [“plugin.facebook.v4”] =

&nbsp; &nbsp; &nbsp; {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publisherId = “com.coronalabs”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; supportedPlatforms = { iphone=true, android=true, [“android-kindle”]=true }

&nbsp; &nbsp; &nbsp; },

It seems to always fail in building.

```
duplicate symbol \_OBJC\_METACLASS\_$\_FBSDKMaleSilhouetteIcon in: /Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/plugin.facebook.v4/libFBSDKCoreKit.a(FBSDKMaleSilhouetteIcon.o) /Users/okkohakola/Desktop/Corona\_games\_projects/facegame.app/.build/plugin.facebookAnalytics/libplugin\_facebookAnalytics.a(FBSDKMaleSilhouetteIcon.o) ld: 508 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) BUILD ERROR: There was a problem linking the app. Check the console for more information. iOS build failed (12) after 17 seconds Feb 06 12:56:53.530 2017-02-06 12:56:53.518 Corona Simulator[2712:72505] logEvent: key: target Feb 06 12:56:53.531 2017-02-06 12:56:53.518 Corona Simulator[2712:72505] logEvent: key: reason Feb 06 12:56:53.531 ERROR: Build Failed: There was a problem linking the app. Check the console for more information.

```

How would I set up a Facebook login while using your plugin?

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [February 7, 2017, 3:36am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/8 "2017-02-07T03:36:20Z")

</div>

it should work with corona plugin on iOS, I might try to include the Facebook plugin with my Facebook analytics plugin. I don’t want to run into trouble with corona legal wise.

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [February 8, 2017, 12:08am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/9 "2017-02-08T00:08:28Z")

</div>

Try building without the Facebook plugin, I push an experimental build that has facebook v4 plugin bundled with the Facebook analytics plugin.

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [August 29, 2017, 11:20pm UTC](https://forums.solar2d.com/t/facebook-analytics/149423/10 "2017-08-29T23:20:45Z")

</div>

Starting today if you are using&nbsp;2017.3128 or higher the plugin will set the Facebook v4a plugin as a&nbsp;dependency. It is now the recommended Facebook SDK of Corona.

---

<div class="post-metadata">

**Author:** ![cjanis](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/c/5daacb/32.png) [@cjanis](https://forums.solar2d.com/u/cjanis)\
**Post date:** [April 11, 2018, 2:57am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/11 "2018-04-11T02:57:52Z")

</div>

Hi Scott,

My builds are succeeding but when I try to run my app in Xcode simulator I get this error.

```
Runtime error: module 'plugin.facebookAnalytics' not found:resource (plugin.facebookAnalytics.lu) does not exist in archive

```

My build.settings and main.lua are set up correctly, I think. If you don’t know of an immediate issue that could be causing this, I’ll post them for you.

Of note, in my console log when I build for the simulator it shows this

```
Apr 10 22:55:10.182 Analyzing plugins...Apr 10 22:55:10.182 Found native plugin: /Users/craigjanis/Desktop/Playmatic.app/.build/plugin.facebook.v4 Apr 10 22:55:10.183 Found native plugin: /Users/craigjanis/Desktop/Playmatic.app/.build/plugin.flurry.analytics &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Done. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Analyzing Lua plugins... Apr 10 22:55:10.183 Examining plugin: plugin.facebook.v4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Examining plugin: plugin.flurry.analytics &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Examining plugin: plugin.facebookAnalytics &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Done.

```

It doesn’t show that the facebookAnalytics plugin is found, but it does seem to be “examining” it, whatever that means.

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [April 13, 2018, 9:41am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/12 "2018-04-13T09:41:35Z")

</div>

If you believe there is a bug file it here  
[https://docs.google.com/forms/d/e/1FAIpQLSf-V3z-V3FZ5y9Sb19cxVfjx7fSRV9HIbpAGptN7DaY3Ki\_DA/viewform](https://docs.google.com/forms/d/e/1FAIpQLSf-V3z-V3FZ5y9Sb19cxVfjx7fSRV9HIbpAGptN7DaY3Ki_DA/viewform)

---

<div class="post-metadata">

**Author:** ![cjanis](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/c/5daacb/32.png) [@cjanis](https://forums.solar2d.com/u/cjanis)\
**Post date:** [April 21, 2018, 12:03am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/13 "2018-04-21T00:03:53Z")

</div>

Ok, I submitted it.

---

<div class="post-metadata">

**Author:** ![akao](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@akao](https://forums.solar2d.com/u/akao)\
**Post date:** [May 15, 2018, 7:24am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/14 "2018-05-15T07:24:11Z")

</div>

Scott - thanks for making the plugin. The documentation says to use the following require in the lua file:

```
local facebook = require("plugin.facebook.v4") local facebookAnalytics = require "plugin.facebookAnalytics" facebookAnalytics.init()

```

But given that Corona now uses v4a. Should that first line be this instead? thx!

```
local facebook = require( "plugin.facebook.v4a" )
```

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [May 15, 2018, 4:48pm UTC](https://forums.solar2d.com/t/facebook-analytics/149423/15 "2018-05-15T16:48:59Z")

</div>

You can use either

> [@akao](#):
>
> Scott - thanks for making the plugin. The documentation says to use the following require in the lua file:
> 
> ```
> local facebook = require("plugin.facebook.v4") local facebookAnalytics = require "plugin.facebookAnalytics" facebookAnalytics.init()
> 
> ```
> 
> But given that Corona now uses v4a. Should that first line be this instead? thx!
> 
> ```
> local facebook = require( "plugin.facebook.v4a" )
> 
> ```

---

<div class="post-metadata">

**Author:** ![david.ciaudo](https://forums.solar2d.com/user_avatar/forums.solar2d.com/david.ciaudo/32/835_2.png) [@david.ciaudo](https://forums.solar2d.com/u/david.ciaudo)\
**Post date:** [June 5, 2018, 6:18pm UTC](https://forums.solar2d.com/t/facebook-analytics/149423/16 "2018-06-05T18:18:57Z")

</div>

I’ve got trouble using custom events and multiple parameters:

Here is the event I tried:

facebookAnalytics.logEvent(“Hello game3”, {myParams = “hello”, myParams2 = 3})

But when I try to make a segment in the facebook console, I can see the first “myParams”, but I can’t see the “myParams2”. Has anyone already tried to use the plugin with multiple parameters?

I’m not quite sure about how to use it. The doc tells :

– params(number)(optional) other params of event[here(App Event Schema)](https://developers.facebook.com/docs/marketing-api/app-event-api/v2.8#conversions)

But I expected params to be a lua table not a number. What am I missing?

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [June 5, 2018, 9:14pm UTC](https://forums.solar2d.com/t/facebook-analytics/149423/17 "2018-06-05T21:14:14Z")

</div>

> [@david.ciaudo](#):
>
> I’ve got trouble using custom events and multiple parameters:
> 
> Here is the event I tried:
> 
> facebookAnalytics.logEvent(“Hello game3”, {myParams = “hello”, myParams2 = 3})
> 
> But when I try to make a segment in the facebook console, I can see the first “myParams”, but I can’t see the “myParams2”. Has anyone already tried to use the plugin with multiple parameters?
> 
> I’m not quite sure about how to use it. The doc tells :
> 
> – params(number)(optional) other params of event[here(App Event Schema)](https://developers.facebook.com/docs/marketing-api/app-event-api/v2.8#conversions)
> 
> But I expected params to be a lua table not a number. Would am I missing?

Can you file a bug report

[https://docs.google.com/forms/d/e/1FAIpQLSf-V3z-V3FZ5y9Sb19cxVfjx7fSRV9HIbpAGptN7DaY3Ki\_DA/viewform](https://docs.google.com/forms/d/e/1FAIpQLSf-V3z-V3FZ5y9Sb19cxVfjx7fSRV9HIbpAGptN7DaY3Ki_DA/viewform)

---

<div class="post-metadata">

**Author:** ![david.ciaudo](https://forums.solar2d.com/user_avatar/forums.solar2d.com/david.ciaudo/32/835_2.png) [@david.ciaudo](https://forums.solar2d.com/u/david.ciaudo)\
**Post date:** [June 6, 2018, 8:00am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/18 "2018-06-06T08:00:56Z")

</div>

I’ve filled a bug report. Basically, my conclusions after in depth testings are:

-You can’t pass both parameters and a valueToSum in the same event.

-You can’t set parameters value to a number. It only works if it’s a string.

---

<div class="post-metadata">

**Author:** ![david.ciaudo](https://forums.solar2d.com/user_avatar/forums.solar2d.com/david.ciaudo/32/835_2.png) [@david.ciaudo](https://forums.solar2d.com/u/david.ciaudo)\
**Post date:** [June 13, 2018, 11:39am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/19 "2018-06-13T11:39:50Z")

</div>

Any news about those bugs? I really need to, at least, be able to send events with a valueToSum and a parameter without this parameter being ignored.

It’s the second event type described in the documentation of the plugin:

facebookAnalytics.logEvent(“Hello world”, 100, {world = “hello”})

But it’s not working. I mean when calling this event, the param world is not sent. I’m sad the plugin sample does not include such event.

Also the fact that parameters cannot be number is annoying to make some decent analytics.

---

<div class="post-metadata">

**Author:** ![Scott\_Harrison](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@Scott\_Harrison](https://forums.solar2d.com/u/Scott_Harrison)\
**Post date:** [June 20, 2018, 1:10am UTC](https://forums.solar2d.com/t/facebook-analytics/149423/20 "2018-06-20T01:10:51Z")

</div>

This has been patched

[Next page](https://forums.solar2d.com/t/facebook-analytics/149423.md?page=2)
