title: Branch.io Deferred deep linking not working in Facebook ads
body: <p>We are implementing deferred deep link for attribution for our android application but are unable to get the install referrer when downloaded from facebook ads.</p>
  
  <p>Steps taken,</p>
  
  <p>1.Created deeplinks from branch.io Dashboard=>Ads=>Links.
  eg myappname.app.link/</p>
  
  <p>2.For redirection in android (when app is not installed) web url is set with desired referrer value. 
  eg.
  <a href="https://play.google.com/store/apps/details?id=" rel="nofollow noreferrer">https://play.google.com/store/apps/details?id=</a><strong>mypackagename</strong>&amp;referrer=<strong>myreferrervalue</strong></p>
  
  <p>3.When user clicks the deep link directly and app is not installed then user is taken to the play store and once the app is installed (through the deep link) we are able to get the install referrer value using install_referrer api broadcast approach.</p>
  
  <p>4.But when app is installed from facebook ads (ads which contains our deeplink),user is taken to play store and once app is installed, we don't get the desired referrer value in install referrer broadcast.  </p>
  
  <p>in Manifest.xml</p>
  
  <pre><code>&lt;receiver android:name=".InstallTracker" android:exported="true"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="com.android.vending.INSTALL_REFERRER" /&gt;
      &lt;/intent-filter&gt;
   &lt;/receiver&gt;
  </code></pre>
  
  <p>Broadcast receiver for install referrer </p>
  
  <pre><code>public class InstallTracker extends BroadcastReceiver {
      private String referrer = "";
      @Override
      public void onReceive(Context context, Intent intent) {
          try {
              if (intent.getAction().equals("com.android.vending.INSTALL_REFERRER")) {
                  Bundle extras = intent.getExtras();
                  if (extras != null) {
                      referrer = extras.getString("referrer");
                      Log.d("tag", "referrer is : "+referrer); 
                  } else {
                      Log.d("tag", "extras is null ");
                  }
              }
          } catch (Exception e) {
              Log.d("tag", "error : "+e.getMessage());
          }
      }
  }
  </code></pre>