I am trying to share some information via clients in Android. This code works fine in Gmail, Evernote, Twitter, Viber, Whatsapp etc. but it doesn't work in Facebook, because they do not support the EXTRA_TEXT field (aaargh!).
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Test message");
sharingIntent.putExtra(Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(sharingIntent,"Share using"));
So I thought of one possible solution. When the user clicks the share button, I create a new dialog that offers to share on Facebook and Others. With the Facebook SDK I can share text, image etc. on Facebook. When the user clicks on Others, the normal share intent should appear with all clients but without the facebook app.
Is this possible? Do you have other ideas to make this work?