Anyone?
On Monday, December 15, 2014 3:04:30 PM UTC+5:30, Tushar Bhasme wrote:
-- On Monday, December 15, 2014 3:04:30 PM UTC+5:30, Tushar Bhasme wrote:
I thought so too, and that's why I calledFB.XFBML.parse()
after initializing.
Putting fb:login-button directly in the binder does not compile.
Thanks,
Tushar
On Monday, December 15, 2014 2:52:03 PM UTC+5:30, Nicolas Weeger wrote: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
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment