View Full Version : Facebook Comment integration

15 Sep 2011, 7:25 AM
Hi Sencha community,

quick question as I'm banging my head against walls: did anybody manage to include the facebook comment plugin (or any other FB extension) successfully into a Sencha Panel? Using the following code works perfectly within Chrome, Andorid browser etc. but if it comes to iOS mobile browser the comments will not be displayed - any help is appreciated.

We are pretty familar withe the Sencha using, currently we've come to the point where we think this is simply not possible using Sencha touch. That's the reason for this post, if anyone managed to include FB successfully please let us know!!

Please find attached some source code, bit as alreasy sais, code works perfectly using Chrome and we've nearly tried anything (loading via iFrame etc.), the snippet below's just our most promising approach...

Thanx in advance, Florian...

P.S.: if someone of the Sencha guys should come across this post: would be great if you could investigate into this issue as combining Facebook Snippets with Sencha might be a pretty common requirement...maybe....

var fb = new Ext.Panel({
id : 'buttonPanel',
width: '280px',
html: '<div id="outer"/>'

function() {
document.getElementById("outer").innerHTML = '<div id="fb-root"></div><div class="fb-comments" data-href="example.com" data-num-posts="2" data-width="280"></div>';
var js, fjs = document.getElementsByTagName('script')[0];
if (document.getElementById('facebook-jssdk')) {return;}
js = document.createElement('script'); js.id = 'facebook-jssdk';
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);