Thread Starter
Bryan
(@bromius)
Okay, I’ve gotten a little further. The problem is somehow related to my Host provider. (Host Gator)
Basically it doesn’t like the url:
http://www.somedomain.com/wp-login.php?redirect_to=http://www.somedomain.com/
It doesn’t like the extra forward slashes.
so I went into sfc-connect-widget.php and changed line 46 to escape the redirect to url:
function sfc_connect_shortcode() {
$login ='<fb:login-button perms="email" v="2" size="medium" onlogin="window.location=\'';
$login .= wp_login_url();
$login .= "?redirect_to='+escape(document.URL);\"";
$login .= '><fb:intl>Connect with Facebook</fb:intl></fb:login-button>';
return $login;
}
Now it gets further.
Now I click the connect widget button, and I get a popup prompting me to approve/login with facebook. I then get sent to a wp-login.php with a username and email field. I click okay on that and viola. I get a wp blog account connected to my fb account.
First question, Otto, how do I get it to skip that “agree to username and email” step and just create the account, like you have on your blog?
Now my second test was to have a pre-existing WP blog account that uses the same email address as my FB account is registered to. Now when I log on to WP blog with my username and pass and _then_ hit the connect it doesn’t recognize that I’m the same person. But it does get my name and email from FB, then redirects to the same “create new account” page filled in with name and email. However now if I click “yes” it complains about an already existing WP account with that name and email. Why is it not connecting a pre-existing WP account with my FB account when I click connect?
Thanks 🙂
Thread Starter
Bryan
(@bromius)
Ah, the links on your site are from sfc-comments not sfc-connect. Slightly different critter 🙂
Question still stand though, why is a pre-existing WP blog account not properly being connected with a FB account.
Also is there a way to check to see if a user is connected? I’d like to not display the connect widget if the user is already connected. I have Widget Logic, so I can turn off the display of the connect widget, as long as I can generate some php that will tell me. Something similar to is_admin(). Maybe is_sfc_connected()?