2

Hi I am using twitter share button with callback function on share so that I can do some processing on successful share. I am using jQuery code for this.

But this code adding iframe and resulting Tweet button don't match my UI. i want to use image for tweet rather then button

Is there any way so that I can use image in iframe instead of button(customize tweet button in iframe code) or Any other way to do this.

My code :

<script>
window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};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);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,"script","twitter-wjs"));
</script>

<a class="twitter-share-button" href="https://twitter.com/share" data-size="small" data-url="http://knoldus.com" data-text="Hello" data-count="none" >Tweet</a>


<script src="https://platform.twitter.com/widgets.js"></script>
<script>
twttr.events.bind('tweet' , function(event) {
// do somethings here
alert("Tweet has been successfully posted");
});
</script>

Thanks In Advance.

Ravi
  • 163
  • 1
  • 5

0 Answers0