Android : How to share image to twitter client on Android

on Wednesday, July 9, 2014


I followed the guide from Adding an Easy Share Action and create my own share action menu. The code looks like below:



if (mActionProvider != null && imageFile != null && imageFile.exists())
mActionProvider.setShareIntent(new Intent() {
setAction(Intent.ACTION_SEND)
setType("image/*")
putExtra(Intent.EXTRA_STREAM, Uri.fromFile(imageFile))
})


This code works fine mostly. I can share images to G+ client, Facebook client, and many other clients, except for the Twitter client. When I choose Twitter client, the UI jumps to Twitter client, but with nothing. No image, no error. Is there any extra steps I need to do for it to work with Twitter client?


0 comments:

Post a Comment