I have an ExtJS component and I want to add a twitter button on it;This component is an item for a simple panel.
Here is my code:
{
xtype:'container',
id:'tweet-button'
html:'<div><a href="https://twitter.com/share" class="twitter-share-button"' +
'data-url="http://myPage.com" data-text="newpage" data-via="myTwitterAccount"'+
'data-size="large">Tweet</a>' +
'<script>!function(d,s,id){' +
'var js,fjs=d.getElementsByTagName(s)[0];'+
'if(!d.getElementById(id)){'+
'js=d.createElement(s);'+
'js.id=id;'+
'js.src="http://platform.twitter.com/widgets.js";'+
'fjs.parentNode.insertBefore(js,fjs);'+
'}'+
'}(document,"script","twitter-wjs");</script></div>'
}
The Twitter button seems to be working, the only that is missing is the rendering;Please help and thanks in advance!
Here is example to integrate twitter button –