Results 1 to 4 of 4

Thread: Facebook like button in floating panel

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: Facebook like button in floating panel

    I have been working on an application using sencha touch 2 .
    I have a toolbar on top which contains a button .
    When i click this button i will have a panel overlay .
    In this panel,i want to have two items :


    Code:
    var shareButton = {
                            xtype : 'button',
                            ui: 'action',
                            width:'36px',
                            height:'36px',    
                            handler : function(){ 
                            var panel=Ext.create('Ext.Panel',{
                    right: 0,
                    top: 20,
                    modal: true,
                    hideOnMaskTap: true,
                    hidden: true,    
                    width: 260,
                    height:'70%' ,
                styleHtmlContent: true,
                    scrollable: true,
                
        items: [
        {html:'<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://www.google.com" data-lang="en">Tweet</a>',},
        {html:'<div ><class="fb-like" data-href="http://test.com" data-send="false" data-layout="button_count" data-width="4" data-show-faces="false"></div>'}]});
            Ext.Viewport.add(panel);
            panel.show();}};

    But this is not working.
    In fact,i want the first one to direct me to twitter to share the URL (www.google.com).
    And the second one to facebook to share "test.com".

    Unfortunately , the word tweet only appears which allows me to access twitter.com
    Thank you.

  2. Thank you.
    I have resolved this thread.
    Actually ,since the overlay is called after the page is loaded, the facebook and twitter buttons should rendered again

    This is the code that should be added after the overlay is shown

    Code:
     FB.XFBML.parse();//facebook
        $.ajax({ url: 'http://platform.twitter.com/widgets.js', dataType: 'script', cache:true}); //twitter

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    Where are you having the facebook api make the button?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Thank you.
    I have resolved this thread.
    Actually ,since the overlay is called after the page is loaded, the facebook and twitter buttons should rendered again

    This is the code that should be added after the overlay is shown

    Code:
     FB.XFBML.parse();//facebook
        $.ajax({ url: 'http://platform.twitter.com/widgets.js', dataType: 'script', cache:true}); //twitter

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default

    is it possible to use a like button within iOS and/or Android? That would be a big win. It seems like Facebook authentication would be an issue.

    If it were possible to Like/Send/Subscribe within Sencha Touch (in iOS/Android) it would be a *big* win. I've been unable to find an answer for this. I'd really like to avoid the complexities of Facebook Connect and if the above were possible that would save a lot of coding.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •