wordpress login - php if statements with fbml conditions?

seanhongkong

New Member
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\[code\]<fb:login-button show-faces="true" width="160" max-rows="2"></fb:login-button>\[/code\]This all works well enough. BUT....I want to achieve something like the following:\[code\] <?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="http://stackoverflow.com/questions/3634312/<?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 } ?>\[/code\]I'm not sure how to integrate the \[code\]***connected with Facebook***\[/code\] part into the php \[code\]elseif\[/code\] 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. :(
 
Back
Top