Android intent to share on Facebook Messenger

A piece of code to share text via Facebook Messenger.
Intent mi = new Intent(Intent.ACTION_SEND);
mi.setType("text/plain");
mi.putExtra(Intent.EXTRA_TEXT, "text to share via Facebook Messenger");
mi.setPackage("com.facebook.orca");
startActivity(Intent.createChooser(mi, "Share on Facebook Messenger"));
See also other code snippets for Android development using Java programming language here on ValueInBrief blog. 
Comment via Facebook
0 Comment via Google

0 تعليقات:

Post a Comment