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
    <script type="text/javascript">
    var t,js,fjs=d.getElementsByTagName(s)[0];
    return window.twttr||(t={_e:[],ready:function(f){



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


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


Recommended Answers

All 2 Replies

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.