unity-branch-deep-linking-attribution icon indicating copy to clipboard operation
unity-branch-deep-linking-attribution copied to clipboard

Branch.setFBAppID support from the C# environment.

Open klim-branch opened this issue 7 months ago • 0 comments

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.

klim-branch avatar Jul 12 '24 08:07 klim-branch