Tweet Composer callback


#1

Im trying to get a callback from TweetComposer after tweet is posted

from this thread Cannot receive broadcast after compose a tweet by TweetComposer, @EricFrohnhoefer stated that using TweetComposer will not sent broadcast. How do we use TweetComposer and get callback that stated the tweet have been posted in app?

From the documentation (https://dev.twitter.com/twitterkit/android/compose-tweets#twitterkit-tweet-composer) did not stated anywhere for callback using TweetComposer


I want to get a callback from TweetComposer
#2

We do call setResult when the Tweet button is pressed. However, we do not provide feedback indicating Tweet was successfully posted. This is something we my look to change in the future.


#3

So the call back is in the onActivityResult which the resultCode is either RESULT_OK or RESULT_CANCEL correct?

If in that case

intent = new TweetComposer.Builder(activity)
                                    .text(tweet)
                                    .url(new URL("http://" + Constant.CONTENT_URL))
                                    .createIntent();
startActivityForResult(intent, TWEET_COMPOSER_REQUEST_CODE);

@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == TWEET_COMPOSER_REQUEST_CODE) {
            if (resultCode == RESULT_OK) {
                   Log.i("Tweet", "Posted");
            }
        }
    }

is this correct? doesnt seem like i get resultCode = RESULT_OK.
Please check image below. This is after i click on tweet on the twitter intent
http://imgur.com/NxOp5GN