I have a few problems with this great mod. I'll try to explain them well.
If a user already has an account on my site with the same email as his Facebook, if he clicks the Login with Facebook button, it links his account nicely, and he can now use Facebook to login and out.
But if he is a new user to my site, and wants to register with Facebook, there is trouble. Using an extra Facebook account, I tested it and this is what happens.
Completely logged out from my site. Logged into Facebook.com with my extra account. Go to my site, click Register, I get the standard registration page, no Facebook. Is that supposed to happen?
I instead, I click on the Login with Facebook button. The popup comes, asks for permission. I Agree and it says all good. But now, the user has to click on "Registration" again, where he has to agree to terms, enter username, password, and email. Shouldn't it all be one step/page? How does the user know to go find the "Registration" link after he already thinks he registered with Facebook in the popup?
After you fill out that registration form, and are registered on the site using Facebook info, it still only shows you the "Registration" link, and shows you as logged out. But even though it thinks you are logged out, it doesn't give you the login form. During all this, the Facebook button itself thinks you are logged in, but the rest of the site doesn't.
And the last problem is login/logout. If I logout from facebook, either on my site, or on facebook.com, I will automatically be logged out from both. So that works.
But, if I login on Facebook.com and then go to my site, it says I'm not logged in, but if I just refresh the page, it shows my all logged in. Is there a way to detect that, and make it refresh or something, so that a user does not try to login when he doesn't have to?
In case I messed up my user_loginform and user_logininfo, I'll include them here. I was using custom login and info forms, but it was too much trouble to edit, so I went back to the standard ones.
user_loginform.html
<table width="100%" height="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td valign="top" align="left">
{ifnot fb_hide1}
<form action="{url_login}" method="post">
{lang_user_name}<br />
<input type="text" size="10" name="user_name" class="logininput" />
<br />
{lang_password}<br />
<input type="password" size="10" name="user_password" class="logininput" />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td><input type="checkbox" name="auto_login" value="1" /></td>
<td><span class="smalltext">{lang_auto_login}</span></td>
</tr>
</table>
<br />
<input type="submit" value="{lang_login}" class="button" />
</form>
» <a href="{url_lost_password}">{lang_lost_password}</a><br />
{endifnot fb_hide1}
{ifnot fb_hide2}
» <a href="{url_register}">{lang_register}</a><br> </td>
{endifnot fb_hide2}
{if fb_hide2}
{fb_message}
{endif fb_hide2}
</tr>
<tr><td valign="top" align="center">
{if fb_loggedin}
<table width="100%" border="0"><tr><td align="right">
<fb:profile-pic uid='loggedinuser' facebook-logo='false'></fb:profile-pic></td><td valign="center" align="left"> Welcome,<BR> <fb:name uid='loggedinuser' useyou='false'></fb:name>
</td></tr></table>
{endif fb_loggedin}
<fb:login-button size="small" length="long" autologoutlink="true" scope="email,user_website,publish_stream" ></fb:login-button>
</td></tr>
</table>
user_logininfo.html
<table width="100%" height="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td valign="top" align="left">
{lang_loggedin_msg}<br />
» <a href="{url_lightbox}">{lang_lightbox}</a><br />
{if support_ticket_activ}
» {url_support_ticket}<br />
» <a href="{url_support_ticket_new}">{lang_support_new}</a><br />
{endif support_ticket_activ}
» <a href="{url_control_panel}">{lang_control_panel}</a><br />
{ifnot fb_loggedin}
» <a href="{url_logout}">{lang_logout}</a><br/>
{endifnot fb_loggedin}
<br /><b class="h2">{cp_link}</b>
</td>
</tr>
<tr><td valign="top" align="center">
{if fb_loggedin}
<table width="100%" border="0"><tr><td align="right">
<img src="{fb_pic_small}"></img></td><td valign="center" align="left"> Welcome,<BR> <a href="http://www.facebook.com/profile.php?id={fb_userid}">{fb_name}</a>
</td></tr></table>
{endif fb_loggedin}
<fb:login-button size="small" length="long" autologoutlink="true" scope="email,user_website,publish_stream" ></fb:login-button>
</td></tr>
</table>
Thanks for any help you can provide for this great mod. It's appreciated.
*EDIT* Also, my site, if you want to have a look there.
http://anime-themes.com Excuse the messy category list. I'm still finishing it up a bit.
*EDIT 2* When that new user tries to register with Facebook, but it doesn't show him as logged in, he can logout from Facebook completely, and login again, and he will be logged into the site.