It is impossible to share text and image (both) on Twitter? (Android Share Intent)


#1

Hi all, i’m a Android developer.

I want to give the user the possibility to share a Image and a Text with Twitter and Facebook. Actually my code can launch Android’s share intent and if the user selects Facebook, all works fine, the Image is attached and the text is shown on the body of the new status.

But something is wrong with Twitter, if i only put a Image all works fine, the image is detected by twitter and automatically uploaded to twipic, then twitter posts the link of the image on the tweet. But if i put a image and a text, then, twitter doesn’t detect the image and it only puts the text on the tweet, the image is ignored. What is wrong?

this is my code:

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”));

Please, can someone tell me how to solve this? or tell me if it is impossible to do it.

Thanks


#2

were you able to solve it?


#3

Hi pable,
Can u explain twitter share in android?


#4

Have a look at this post:


#5

sir can u help me how to share the image , means post the iamge on wall of twitter on wall of twitter i try many cod e but did not get the success , any budy have the sample plz share with me rishigautamg@gmail.com


#6

i neede a full code of android apps for tweet a picture with text in twiteer please, Help


#7

please also send me the code at waleedahmed_786@yahoo
.com


#8

Sir.
I am going to share image and text without intent in my app on the twitter.
Could you give me solution ?
My email is developeraaaa@gmail.com
I hope good news.
:slight_smile:


#9

Moving to the correct forum.


#10