BranchMetrics / unity-branch-deep-linking-attribution

The Branch Unity SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/apps/unity/
MIT License
118 stars 24 forks source link

Branch.setFBAppID support from the C# environment. #218

Open klim-branch opened 2 months ago

klim-branch commented 2 months ago

Hi! This is Kun from the Branch integration team.

Could you please check and perhaps implement a function( Branch.setFBAppID ) from the C# front-end code using the Native Branch SDK?

Following function from the native side:

  package com.example.android

  import android.app.Application
  import io.branch.referral.Branch

  class CustomApplicationClass : Application() {

      override fun onCreate() {
          super.onCreate()

          // Branch object initialization
          Branch.getAutoInstance(this.applicationContext)

          // Set your Facebook App ID for Meta Install Referrer
          Branch.setFBAppID("YOUR_FACEBOOK_APP_ID_HERE")
      }
  }

Reference: https://help.branch.io/using-branch/docs/facebook-install-referrer#1b-set-your-fb-app-id-meta-install-referrer-only

This is a necessary function to use the Meta Branch referrer, which will be used to get the Facebook data while following Facebook's AMM depreciation.

I was able to see that we indeed do have:

Branch.addFacebookPartnerParameter();

But it seems like this is not the right function since it requires 2 parameters and the following is the function method:

public static void addFacebookPartnerParameter(string name, string val) {

        if (!string.IsNullOrEmpty (name) && !string.IsNullOrEmpty (val)) {
            _addFacebookPartnerParameter (name, val);
        }
    }

Let me know if we indeed do have a function already to handle this.