Hello.

The Facebook script is probably called before your own script runs. So when it 
initializes it doesn't find any <fb:login> to process, since you add it 
manually.


You should probably put the <fb:login> code directly in your HTML/uiBinder.



Hope this helps



Kind regards


Nicolas



Le lundi 15 décembre 2014 04:49:10, Tushar Bhasme a écrit :
> I am trying to integrate fb login to my app. I added the script to
> initialize the js:
> 
> 
> <div id="fb-root"></div>
>     <script>
>     (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/sdk.js#xfbml=1&appId=<app_id>&version=v2.1";
>             fjs.parentNode.insertBefore(js, fjs);
>         }(document, 'script', 'facebook-jssdk'));
>     </script>
> 
> Added the login button as HTML in my uiBinder:
> <g:HTML ui:field="fbLoginButton" />
> 
> and in view class:
> fbLoginButton.setHTML("<fb:login-button max_rows='1' size='medium'
> show_faces='false' auto_logout_link='false'></fb:login-button>");
> 
> and called fb parsing as jsni:
> private native void parseDomTree() /*-{
>         $wnd.FB.XFBML.parse();
>   }-*/;
> 
> The login button still does not show up on screen. What did I miss?
> 
> Thanks,
> Tushar

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to