Hey,
well I'm new to the facebook api stuff, and just recently someone told me I was using the old api.
So now, I can't seem to figure out how to check if the user is logged into my site with the new api.
all I really have is
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: '(appid)', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('auth.sessionChange', function(response) {
if (response.session) {
// A user has logged in, and a new cookie has been saved
} else {
// The user has logged out, and the cookie has been cleared
}
});
</script>
and a login button.
If anyone could show me how to check if someones logged in, (or is that it right there?) because I'd like it to change the login button located in a div called
to welcome the user.
or even point me towards some useful tutorials that would be great!
Thanks