1. #1
    Sencha User kenono's Avatar
    Join Date
    Jun 2012
    Location
    Liverpool, UK
    Posts
    13
    Answers
    1
    Vote Rating
    1
    kenono is on a distinguished road

      0  

    Default Unanswered: Twitter @Anywhere in Ext.Panel

    Unanswered: Twitter @Anywhere in Ext.Panel


    I'm trying to get my app able to share a URL using Twitter.
    As my Sencha Touch app is essentially HTML I assume I can use Twitter's @Anywhere Tweetbox (https://dev.twitter.com/docs/anywhere/welcome#tweetbox) within a Ext.Panel. However it does not work in my Sencha app.

    I load the panel with the following code:

    Code:
    var popup = new Ext.Panel({    floating: true,
        centered: true,
        modal: true,
        width: 300,
        height: 400,
        hideOnMaskTap: true,
        showAnimation: {
            type: 'popIn',
            duration: 250,
            easing: 'ease-out'
        },
        hideAnimation: {
            type: 'popOut',
            duration: 250,
            easing: 'ease-out'
        },
        scrollable: 'vertical',
        html: '<!DOCTYPE HTML><html><head><meta http-equiv="Content-type" content="text/html;charset=utf-8"><title>Anywhere Sample</title><script src="http://platform.twitter.com/anywhere.js?id=APIKEY&v=1" type="text/javascript"></script></head><body><div id="tbox"></div><script type="text/javascript">twttr.anywhere(function (T){T("#tbox").tweetBox({height: 100, width: 400, defaultContent: "<YOUR DEFAULT TWEETBOX CONTENT HERE>" });});</script></body></html>',
        dockedItems: [{
            xtype: 'toolbar',
            title: 'Twitter',
            docked: 'top',
            items: [{
                xtype: 'spacer'
            }, {
                text: 'Close',
                handler: function() {
                    popup.hide();
                }
            }]
        }],
    });
    For clarity, my html param is:

    Code:
    <!DOCTYPE HTML><html>
        <head>
            <meta http-equiv="Content-type" content="text/html; charset=utf-8">
            <title>Anywhere Sample</title>
            <script src="http://platform.twitter.com/anywhere.js?id=APIKEY&v=1" type="text/javascript"></script>
        </head>
        <body>
            <div id="tbox"></div>
            <script type="text/javascript">
                  twttr.anywhere(function (T) {
                    T("#tbox").tweetBox({
                          height: 100,
                          width: 400,
                          defaultContent: "<YOUR DEFAULT TWEETBOX CONTENT HERE>"
                    });
                  });
            </script>
        </body>
    </html>
    My APIKEY is a valid key, and this code works fine when I save it as a HTML file and open it in my web browser.

    I would like to know why this does not work? Finally, I get no errors from Chrome's web inspector either.

  2. #2
    Sencha User kenono's Avatar
    Join Date
    Jun 2012
    Location
    Liverpool, UK
    Posts
    13
    Answers
    1
    Vote Rating
    1
    kenono is on a distinguished road

      0  

    Default


    I suspect the html param for my Ext.Panel is not loading the HTML as a full file, rather reading it as it is all markup to be inserted into the body of a HTML document.

    Screen Shot 2012-07-02 at 14.53.40.png

    This is my web inspector, not there is no <head> or <body> tags even though I had typed them into the panel html parameter.

    If I am correct in my assumption the panel is trying to load this all into the <body>, then is there a way around this so I can use the full HTML file and thus, enable the Twitter tweet box in my application?

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

      0  

    Default


    Hi,
    have you found a solution for this. Can you please share it.

  4. #4
    Sencha User kenono's Avatar
    Join Date
    Jun 2012
    Location
    Liverpool, UK
    Posts
    13
    Answers
    1
    Vote Rating
    1
    kenono is on a distinguished road

      0  

    Default


    Hi manoveg, I never found a working solution to this in the end. Sorry I couldn't help you more.

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