I am trying to integrate fb login to my app. I added the script to initialize the js:
Added the login button as HTML in my uiBinder:
and in view class:
and called fb parsing as jsni:
The login button still does not show up on screen. What did I miss?
Thanks,
Tushar
-- <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