On this page: http://friendsconnect.org/shadowlink/ you can see in the lower right hand corner I have a Facebook login button titled "Connect with Facebook". However the button won't do anything when clicked. What am I doing wrong?
Button code:
<fb:login-button autologoutlink="true" perms="email,user_birthday,status_update开发者_开发问答,publish_stream">Connect with Facebook</fb:login-button>
Page will not work in Chrome, Safari, or Firefox.
Your problem is that you are missing this code which can be placed anywhere in your page:
<div id="fb-root"></div>
If you look at the Chrome debugger tools console you will see it telling you that this is missing because you have a document.getElementById('fb-root')
call that is returning null.
Were you maybe already logged in to Facebook? If you are already logged in and have already authorized the app, the button may appear to do nothing if you are only catching auth.login and auth.logout events since neither of those is actually happening.
精彩评论