I want to add a sharing button to my application, and I did the following:
final Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("plain/text"); shareIntent.putExtra(Intent.EXTRA_TEXT, "www.somesite.com"); startActivity(Intent.createChooser(shareIntent, "Share..."));
It shows a dialog, and I do not see facebook and twitter in this dialog. I have both of these applications installed on my phone. So the first question is - why doesn't he show them? And second , if later I somehow show them on the phone how to make this dialogue show only facebook and twitter, and if the user does not have them, ask the user to simply install it by indicating the link to the official application.
Daler source share