title: Facebook Messenger sending metadata (Android)
body: <p>I'm following <a href="https://developers.facebook.com/docs/messenger/android" rel="nofollow noreferrer">this guide</a> to create an app which sends an image to Facebook messenger.</p>
  <pre><code>String mimeType = &quot;image/png&quot;;
  Uri contentUri = Uri.parse(&quot;android.resource://com.test.test/drawable/foobar&quot;);
  
  String metadata = &quot;{ \&quot;name\&quot;: \&quot;baz\&quot; }&quot;;
  ShareToMessengerParams params = ShareToMessengerParams.newBuilder(contentUri, mimeType).setMetaData(metadata).build();
  MessengerUtils.shareToMessenger(this, REQUEST_CODE_SHARE_TO_MESSENGER, params);
  </code></pre>
  <p>The code is pretty simple and almost identical to Facebook's own sample code. The image is properly sent to the messenger which recognizes my app to be optimized and supplies the REPLY button. However, I am having trouble getting the metadata sent across. When the REPLY button is pressed, everything that's supposed to be in the extra bundle (<code>EXTRA_IS_REPLY</code>, <code>EXTRA_THREAD_TOKEN</code>, <code>EXTRA_PARTICIPANTS</code>) is sent back to the app but not the metadata. Any help will be greatly appreciated.</p>
  <p>Below is a snippet from manifest:</p>
  <pre><code>    &lt;!-- Activities --&gt;
      &lt;activity
          android:name=&quot;.MainActivity&quot;
          android:windowSoftInputMode=&quot;stateHidden&quot;
          android:label=&quot;@string/app_name&quot; &gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
          &lt;/intent-filter&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.PICK&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;
              &lt;category android:name=&quot;com.facebook.orca.category.PLATFORM_THREAD_20150311&quot;/&gt;
          &lt;/intent-filter&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.PICK&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;
              &lt;category android:name=&quot;com.facebook.orca.category.PLATFORM_THREAD_20150314&quot;/&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  <p><img src="https://i.stack.imgur.com/6z5hp.jpg" alt="enter image description here" /></p>