Integration of Android apps into Facebook Messenger

I am trying to integrate the Facebook Messenger platform into my android app.

FacebookSdk.sdkInitialize(getApplicationContext());
String mimeType = "image/jpeg";
String metadata = "{ \"type\": \"event\" }";
ShareToMessengerParams shareToMessengerParams = ShareToMessengerParams
    .newBuilder(Uri.fromFile(new File("/sdcard/Images/img.jpg")), mimeType)
    .setMetaData(metadata)
    .build();
MessengerUtils.shareToMessenger(this, 1, shareToMessengerParams);

      

Content from AndroidManifest.xml

<intent-filter>
    <action android:name="android.intent.action.PICK"/>
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="com.facebook.orca.category.PLATFORM_THREAD_20150314" />
</intent-filter>

      

Then I use below code to get metadata from Intent

MessengerThreadParams mThreadParams = MessengerUtils.getMessengerThreadParamsForIntent(intent);
String metadata = mThreadParams.metadata;

      

But still I am not getting the metadata back, I have followed it exactly as mentioned in the Messenger documentation.

+3
android facebook android-facebook messenger facebook-messenger


source to share


No one has answered this question yet

See similar questions:

1
Facebook Messenger Sends Metadata (Android)

or similar:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to persist android activity state by persisting instance state?
2097
Is there a way to run Python on Android?
1858
"Debug certificate expired" error in Android Eclipse plugins
1844
What is "Context" on Android?
1571
How does Facebook disable built-in developer tools?
512
The developers of this app haven't configured this app correctly for Facebook login?



All Articles
Loading...
X
Show
Funny
Dev
Pics