【发布时间】:2016-01-30 19:24:23
【问题描述】:
您好,我正在尝试使用织物库中的 TweetComposer 来发布照片。但是,一旦请求 Twitter 的意图,Twitter 就会崩溃,不会提供任何错误消息。我希望其他人有类似的经历?这是我正在使用的代码。
File newFile = new File(getContext().getFilesDir(), "snapshot.jpg");
try {
FileOutputStream fos = new FileOutputStream(newFile);
b.compress(Bitmap.CompressFormat.JPEG,50,fos);
fos.close();
}
catch(Exception e)
{
}
TweetComposer.Builder builder = new TweetComposer.Builder(getActivity()).text("TWEEEET")
.image(Uri.fromFile(newFile));
builder.show();
当我不添加图像时它确实有效!
Twitter 在添加图片时出现不支持的媒体错误。
谢谢!
【问题讨论】:
标签: android android-intent twitter share twitter-fabric