I'm trying to integrate Facebook Connect with my Wordpress installation. I DO NOT want to use a plugin for this as all the ones I've tried do not give me the scope I need.
I've set everything up giving the user the option to log in (with previously created wordpress details), register (with wordpress) or login with Facebook using
<fb:login-button show-faces="true" width="160" max-rows="2"></fb:login-button>
This all works well enough. BUT....
I want to achieve something like the following:
<?php global $user_identity, $user_ID; if (is_user_logged_in()) { ?>
// Wordpress user details here
<?php } elseif ***connected with Facebook*** { ?>
// Facebook user details here
<?php } else { ?>
<a href="<?php bloginfo('url') ?>/wp-login.php">Log in (existing users)</a>
<fb:login-button show-faces="true" width="160" max-rows="2"></fb:login-button>
<?php } ?>
I'm not sure how to integrate the ***connected with Facebook***
part into the php elseif
statement.
Has anyone done this before or could point me to some understandable documentation on this. The FBML documentation assumes you know a lot already... I don't. :(