How to setup facebook sdk in project for app install

Hi guys,

I’m going to use facebook ads for run campaign of ios app install. I config in build.settings by Corona documents as below for tracking results:

settings = {

    plugins =

    {

        [“plugin.facebook.v4”] =

        {

            publisherId = “com.coronalabs”,

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

        },

    },

}

and 

settings = {

    iphone =

    {

        plist =

        {

            MinimumOSVersion = “7.0”,

            UIApplicationExitsOnSuspend = false,

            FacebookAppID = “XXXXXXXXXX”,  – Replace XXXXXXXXXX with your Facebook App ID

            CFBundleURLTypes =

            {

                { CFBundleURLSchemes = { “fbXXXXXXXXXX”, } }  – Replace XXXXXXXXXX with your Facebook App ID

            },

            – Whitelist Facebook apps

            LSApplicationQueriesSchemes =

            {

                “fb”,  – Needed for the facebook-v4.isFacebookAppEnabled() API

                “fbapi”,

                “fbauth2”,

                “fb-messenger-api”,

                “fbshareextension”

            },

        }

    }

}

Does it not enough?  Thanks

The build.settings file contains only one “settings” table. You have to combine them into a single build.settings file. Please see:

https://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/

Then you will likely need to call the .publishInstall() API call in your code to register your app with Facebook’s attribution service. You don’t need to implement Facebook in your app (likes, login, friends, etc.) to use this API call. 

Can I call the .publishInstall() API in the main.lua file?

Thanks Rob

Yes.

Thanks Rob

The build.settings file contains only one “settings” table. You have to combine them into a single build.settings file. Please see:

https://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/

Then you will likely need to call the .publishInstall() API call in your code to register your app with Facebook’s attribution service. You don’t need to implement Facebook in your app (likes, login, friends, etc.) to use this API call. 

Can I call the .publishInstall() API in the main.lua file?

Thanks Rob

Yes.

Thanks Rob