I have this code to log people in with Facebook:
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=my_app_id&xfbml=1">
</script><fb:login-button show-faces="false" perms="user_hometown,user_about_me,email,user_address" autologoutlink="true" width="200" max-rows="1">
</fb:login-button>
<?php
if($facebook->getSession())
{
// Nothing here yet
}
?>
But the call to $facebook->getSession() seems to break the page. Nothing below this call gets displayed. Any idea why? Or what I am doing wrong?
Here is the page where I am trying to test this:
http://www.comehike.com/test_fb_connect.php
If that’s your entire PHP file then your referencing
$facebookwhich hasn’t been declared yet. You’ll want to include the location of the PHP SDK then initialize$facebookwith your appID and secret. This format has changed with v3.0.0 of the PHP SDK found here.V 2.2.X
V 3.0.0