簡體   English   中英

在分享帖子后,是否在twitter中使用面料的回調方法?

[英]Is there any callback method in twitter using fabric in android after sharing the post?

我使用以下代碼在Twitter上發布推文,用於自定義登錄按鈕

File file = captureScreen();
TweetComposer.Builder builder = new TweetComposer.Builder(getActivity())
.text("just setting up my Fabric.")
.image(Uri.fromFile(file));
builder.show();

與圖像共享帖子工作正常,是否有任何回調方法成功向用戶顯示警報。

提前致謝。

使用下面的代碼 - >

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
            }
        }
    }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM