Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Facebook Analytics
Started by Scott Harrison Dec 23 2016 11:29 PM

25 replies to this topic
[TOPIC CONTROLS]
Page 1 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

Facebook Analytics

 

View and activate on the Corona Store

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

Documentation



[TOPIC: post.html]
#2

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

added limitEventUsage

https://scotth.tech/plugin-facebookAnalytics



[TOPIC: post.html]
#3

okko.hakola

[GLOBAL: userInfoPane.html]
okko.hakola
  • Observer

  • 3 posts
  • Corona SDK

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? 



[TOPIC: post.html]
#4

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

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

[TOPIC: post.html]
#5

okko.hakola

[GLOBAL: userInfoPane.html]
okko.hakola
  • Observer

  • 3 posts
  • Corona SDK

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

 

Also, update this part: 

publisherId = "com.scottrules44",  

 

Thanks for the help! Worked with build 3007



[TOPIC: post.html]
#6

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

updated



[TOPIC: post.html]
#7

okko.hakola

[GLOBAL: userInfoPane.html]
okko.hakola
  • Observer

  • 3 posts
  • Corona SDK

Hi again, Scott!

 

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

 

      ["plugin.facebook.v4"] =
      {
          publisherId = "com.coronalabs",
          supportedPlatforms = { iphone=true, android=true, ["android-kindle"]=true }
      },
 
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?



[TOPIC: post.html]
#8

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

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.



[TOPIC: post.html]
#9

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

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



[TOPIC: post.html]
#10

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

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



[TOPIC: post.html]
#11

cjanis

[GLOBAL: userInfoPane.html]
cjanis
  • Observer

  • 25 posts
  • Corona SDK

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
                     Done.
                    
                    Analyzing Lua plugins...
Apr 10 22:55:10.183 Examining plugin: plugin.facebook.v4
                    Examining plugin: plugin.flurry.analytics
                    Examining plugin: plugin.facebookAnalytics
                     Done.

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



[TOPIC: post.html]
#12

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

If you believe there is a bug file it here
https://docs.google.com/forms/d/e/1FAIpQLSf-V3z-V3FZ5y9Sb19cxVfjx7fSRV9HIbpAGptN7DaY3Ki_DA/viewform

[TOPIC: post.html]
#13

cjanis

[GLOBAL: userInfoPane.html]
cjanis
  • Observer

  • 25 posts
  • Corona SDK

Ok, I submitted it.



[TOPIC: post.html]
#14

akao

[GLOBAL: userInfoPane.html]
akao
  • Contributor

  • 372 posts
  • Corona SDK

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" )



[TOPIC: post.html]
#15

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

You can use either

 

 

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" )



[TOPIC: post.html]
#16

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 55 posts
  • Corona SDK

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 eventhere(App Event Schema)

 

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



[TOPIC: post.html]
#17

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

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 eventhere(App Event Schema)

 

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



[TOPIC: post.html]
#18

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 55 posts
  • Corona SDK

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.



[TOPIC: post.html]
#19

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 55 posts
  • Corona SDK

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.



[TOPIC: post.html]
#20

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

This has been patched



[TOPIC: post.html]
#21

dmytrodrach

[GLOBAL: userInfoPane.html]
dmytrodrach
  • Enthusiast

  • 38 posts
  • Corona SDK

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?

 

 

 

Attached Files



[TOPIC: post.html]
#22

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise

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



[TOPIC: post.html]
#23

burdin.advert

[GLOBAL: userInfoPane.html]
burdin.advert
  • Observer

  • 1 posts
  • Corona SDK

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



[TOPIC: post.html]
#24

dmytrodrach

[GLOBAL: userInfoPane.html]
dmytrodrach
  • Enthusiast

  • 38 posts
  • Corona SDK

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


  • Scott Harrison likes this

[TOPIC: post.html]
#25

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 588 posts
  • Corona SDK

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

  • dementor0008 likes this


[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]