How can i get response after tweeted successfullly


#1

how can i get a response function after tweeted successfullly ?!

            twttr.widgets.createShareButton(
                '/',
                document.getElementById('new-button'),
                {
                    count: 'none',
                    text: url
                }).then(function (el) {
                console.log("Button created.");
            });


            //event bind
            **twttr.events.bind('tweet', handleTweetEvent);**
            function handleTweetEvent(event) {
   
              SomeCode();          
       
            }

but i just want to trigger the function ‘SomeCode()’ when it tweeted successfully ;


#2

That’s not possible unfortunately - the event will trigger when the Tweet action is invoked, there’s no corresponding event when the Tweet is successfully posted.