Iframe in sencha Touch

378 views Asked by At

I need to use a facebook like button iframe in my Android App...if I use this code I see it on my PC Desktop but I don't see anything in Android.

Do you know why and if exist a method to display the like button in Android? I'm Using Sencha Architect and Touch 2.3 Thank you

<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FFacebookDevelopers&amp;width&amp;height=62&amp;colorscheme=light&amp;show_faces=false&amp;header=false&amp;stream=false&amp;show_border=false&amp;appId=780849738633803" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:62px;" allowTransparency="true"></iframe>

1

There are 1 answers

3
Carlo On

It is as you say you.

This is my code:

htmlStrBase1 = '<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fopticaltrend12345%2F&amp;width&amp;layout=button&amp;action=like&amp;show_faces=false&amp;share=false&amp;height=35&amp;appId=780849738633803" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:35px;" allowTransparency="true"></iframe>';
component.add({
        xtype: 'container',
        id: 'fb-root',
        width: 50,
        height: 20,
        flex:1,
    listeners: {
        initialize : function (container) {
            (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";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));
            container.setHtml(htmlStrBase);
        }
    }
});