title: Facebook App Invites: pass campaign params to Play store
body: <p>I'm using Facebook App Invites for Android. Everything works fine: I send an invitation, I receive it on the target device, I can install app from Google Play.</p>
  
  <p>Now I want to pass the user's referrer code to Google Play. The idea is when my "friend" installs the app, he automatically has my referral code. I have my BroadcastReceiver that is catching Google campaign parameters.</p>
  
  <p>I have a server-side script which generates a simple code like this :</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta property="fb:app_id" content="&lt;MY_APP_ID&gt;"&gt;
      &lt;meta property="og:title" content="&lt;APP_NAME&gt;"&gt;
      &lt;meta property="al:android:url" content="market://details?id=&lt;PACKAGE_NAME&gt;&amp;amp;referrer=utm_source%3D&lt;REF_CODE&gt;"&gt;
      &lt;meta property="al:android:app_name" content="&lt;APP_NAME&gt;"&gt;
      &lt;meta property="al:android:package" content="&lt;PACKAGE_NAME&gt;"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      Redirect...
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The problem is Facebook changes campaign parameters, so I receive something like this :</p>
  
  <pre><code>utm_source = apps.facebook.com
  utm_content = {"app":0,"t":&lt;SOME_NUMERIC_ID&gt;}
  utm_campaign = fb4a
  </code></pre>
  
  <p>Android-side: Send an invitation:</p>
  
  <pre><code>AppInviteContent content = new AppInviteContent.Builder()
                          .setApplinkUrl("&lt;SERVER_SCRIPT_URL&gt;.php?referral="+ref_code)
                          .setPreviewImageUrl("&lt;IMAGE&gt;.png")
                          .build();
                  if (AppInviteDialog.canShow()) {
                      appInviteDialog.show(getActivity(), content);
                  }
  </code></pre>
  
  <p>Android-side: Broadcast receiver:</p>
  
  <pre><code>@Override
  public void onReceive(Context context, Intent intent) {
      Bundle extras = intent.getExtras();
      String referrerString = extras.getString("referrer");
      ...
  }
  </code></pre>
  
  <p>I found a similar question posted in 2014 <a href="https://stackoverflow.com/questions/25873393/install-referrer-parameter-values-modified-by-facebook">here</a> but no answer was provided.</p>
  
  <p>So, my question is how can I pass my own parameter to Play Store via Facebook App Invites and how can I receive it with my BroadcastReceiver ?</p>