我使用以下代码在Twitter上发布推文,用于自定义登录按钮
File file = captureScreen();
TweetComposer.Builder builder = new TweetComposer.Builder(getActivity())
.text("just setting up my Fabric.")
.image(Uri.fromFile(file));
builder.show();
与图像共享帖子工作正常,是否有任何回调方法成功向用户显示警告。
提前致谢。
答案 0 :(得分:2)
使用以下代码 - >
Intent i = new TweetComposer.Builder(this)
.text(content)
.url(new URL(url))
.createIntent();
startActivityForResult(i, Constants.REQUEST_CODE_TWITTER);
@Override
protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == Constants.REQUEST_CODE_TWITTER) {
if (resultCode == RESULT_OK) {
// do your stuff
}
}
}