Quiero dar al usuario la posibilidad de compartir una imagen y un texto con Twitter y Facebook.Problemas para compartir texto e imagen combinados con SHARE INTENT en Twitter
En realidad, mi código puede iniciar la intención de compartir de Android y si el usuario selecciona Facebook, todo funciona bien, la imagen se adjunta y el texto se muestra en el cuerpo del nuevo estado.
Pero algo está mal con Twitter, si solo pongo una Imagen todo funciona bien, la imagen es detectada por Twitter y automáticamente cargada en twipic, luego Twitter publica el enlace de la imagen en el tweet. Pero si pongo una imagen y un texto, entonces, Twitter no detecta la imagen y solo pone el texto en el tweet, la imagen es ignorada. ¿Qué está mal?
este es mi código:
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
Uri screenshotUri = Uri.parse("file:///sdcard/image.jpg");
sharingIntent.setType("image/*");
sharingIntent.putExtra(Intent.EXTRA_TEXT, "Body text of the new status");
sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
startActivity(Intent.createChooser(sharingIntent, "Share image using"));
Tener un vistazo a este post: http://stackoverflow.com/questions/2077008/android-intent-for-twitter-application/9151983#9151983 – Derzu