Is it possible to send a message to the facebook messenger using url scheme? after searching for schemes I found that messenger opens using fb://messaging/ does anybody know how
You can use fb-messenger://share?link=
or fb-messenger://share?text=
I don´t think it´s possible - and after all the message always must be 100% user generated so it does not really make sense to attach any message.
you should try this
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "Your message");
sendIntent.setType("text/plain");
sendIntent.setPackage("com.facebook.orca");
try {
startActivity(sendIntent);
} catch (android.content.ActivityNotFoundException ex) {
ToastHelper.show(this, "Please Install Facebook Messenger");
}
It will open Facebook Messenger app, select a friend and the message will be send.