I'm using the code below to share Image and text in Android. When I choose Whatsapp it shares the image and text together , but when I choose Facebook it just shares Image without any text! What's mistake in my code? Thanks.
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/jpeg");
share.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(bitmapPath)));
share.putExtra(Intent.EXTRA_TEXT, "Shared via" + APP_URL);
startActivity(Intent.createChooser(share, "Share Image"));
Facebook will not allow you to Share any static text you want.
That's why Facebook have provide it's own Share Dialog to post any text on facebook.
It will take image as static but not text.
So better for facebook share only you use Facebook Share Dialog.
The thing is, if you put a URL in the EXTRA_TEXT field, it does work. It's like they're intentionally stripping out any text.
**Check below links for Integration of Facebook Share.**
https://developers.facebook.com/docs/sharing/reference/share-dialog
Android: How to share image with text on facebook via intent?