Hi I am new to Sencha Touch.
I have to integrate facebook like button in sencha touch.
I used the code below and I am able to get facebbok like plugin to display but I want an xtype button with label facebook to do the functionality that is currently done by like plugin of facebook from the code below.
Please advice whether it is possible and if yes how.
Code:
Ext.define('Main.view.LikeUs', {
extend: 'Ext.Panel',
config: {
title: "LikeUs",
layout: 'fit',
listeners: {
show: function() {
window.fbAsyncInit = function() {
FB.init({appId: '0123456789123456', status: true, cookie: true,xfbml: true});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
}},
items: [{
xtype: 'container',
html: '<div id="fb-login-button"><fb:like align="right" href="http://www.facebook.com/appname" layout="button_count"></fb:like></div><div id="fb-root"></div>',
}]
}
});
and I want to do the same for twitter.