0

We add a Default Tweet Button API on my site. it's work perfect and load new window and send the tweet.
but i want to get the value of the tweet count id. or if anybody click on the tweet button and submit a tweet .
then my page show an alert message .
aler "Tweet send succefully."
Please help me how we can do this. Thanks

//Here is the API
    <html>
    <script type="text/javascript">
    window.twttr=(function(d,s,id){
    var t,js,fjs=d.getElementsByTagName(s)[0];
    if(d.getElementById(id)){
    return
    }
    js=d.createElement(s);
    js.id=id;
    js.src="https://platform.twitter.com/widgets.js";
    fjs.parentNode.insertBefore(js,fjs);
    return window.twttr||(t={_e:[],ready:function(f){
    t._e.push(f)

    }})}
    (document,"script","twitter-wjs"));

    </script>

    <script>
    function myFunction() {
        var x = document.getElementById('count');
        document.getElementById("result").innerHTML = x;
        aler ('tweet send succesfully. ';
    }

    </script>
    <body>

    <a onclick="myFunction()" class="twitter-share-button"  href="https://twitter.com/share"  target="_blank">
    Tweet
    </a>
    <p id="result"></p>




</body>
</html>
2
Contributors
2
Replies
15
Views
2 Years
Discussion Span
Last Post by razamughal67
0

Is your problem that counts are not being shown on page? as far as message is concerned it is showing your tweet has been posted succesfully.

0

Hi @imti321 thanks for reply.
if we click on tweet button on my site and open a new tab there is a button like Tweet
if we click that button tweet was send . now get back to my site page and here i want to confirm tweet is send successfully or not.

maybe anybody click on the tweet button on my site but after click they could not send a tweet from twitter page .
can you help me to do this.
Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.