1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
    manoveg is on a distinguished road

      0  

    Default Facebook like button

    Facebook like button


    Hi,

    I am new to sencha. I have to create a Facebook like button in an already existing sencha app.
    I have this link https://developers.facebook.com/docs.../plugins/like/
    but I don't know how to use it.

    Please can anybody give me a small example.

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi!
    sample steps to like google.com :-

    1.Include the JavaScript SDK on your page.
    Code:
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    2.Place the code for your plugin wherever you want the plugin to appear on your page.
    Code:
    <div class="fb-like" data-href="http://google.com" data-send="false" data-width="450" data-show-faces="true"></div>
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
    manoveg is on a distinguished road

      0  

    Default


    thanks but I am still facing some problems

    I added javascript sdk in my index.html file inside <body> tag

    now I need like button as a xtype:button in a panel
    therefore I have created a new panel in a separate js file and added buttons . Now when I click on Facebook button it should behave as Facebook like button. Please advice.

    I also tried
    Code:
    items:[
            { 
             html:'<div class="fb-like" data-href="http://google.com" data-send="false" data-width="450" data-show-faces="true"></div>'    		 
    	},
    but nothing is appearing in that panel

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
    manoveg is on a distinguished road

      0  

    Default


    I have tried this to show a facebook like button but nothing is showing. Please guide me to correct approach

    Code:
    MyApp.views.appEmpfehlenPopup = new Ext.Panel({
          config: {
            title: "LikeUs",
            layout: 'fit',
            listeners: {
                show: function() {                
            
              (function(d, s, id) {
               var js, fjs = d.getElementsByTagName(s)[0];
               if (d.getElementById(id)) return;
              js = d.createElement(s); js.id = id;
              js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
             fjs.parentNode.insertBefore(js, fjs);
             }(document, 'script', 'facebook-jssdk'));
                }},
            items: [{
                  xtype:'container',
                html: '<fb:like href="http:// raahede.com/blog/2010/10/06/adding-facebook-like-buttons-to-your-website.aspx" layout="button_count" show_faces="false" colorscheme="light">test</fb:like>'           
            }]
        }
    });

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi