Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

facebook like button for web app

I am trying to implement the facebook like button feature on page for web app (no phonegap). When I try to view page, the button is not showing (div is empty on page source). When I refresh page, button shows. I am wondering what the problem might be. When I do get button to show, it works fine- posts to facebook.

Like button docs:
https://developers.facebook.com/docs/...

On page, I added two panels:

First panel at top of page called fbPanel contains code provided by facebook like button configurator:

code
<div id="fb-root"><&#47;div>
<script>(function(d, s, id) {
var js, fjs = d&#46;getElementsByTagName(s)[0];
if (d&#46;getElementById(id)) return;
js = d&#46;createElement(s); js&#46;id = id;
js&#46;src = "&#47;&#47;connect&#46;facebook&#46;net&#47;en_US&#47;all&#46;js#xfbml=1&appId=may-app-id&quot
fjs&#46;parentNode&#46;insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));<&#47;script>
/code

The next panel where button is to be shown, showPanel is empty to start.

On the pageShow event I run this script:

var url = localStorage.getItem('currentPage');
var addedCode='';
Tiggzi('showPanel').append(addedCode):

Return to “Issues”