Facebook require_login not working

Posted by kielie on Stack Overflow See other posts from Stack Overflow or by kielie
Published on 2010-06-08T18:29:52Z Indexed on 2010/06/08 18:32 UTC
Read the original article Hit count: 662

hi guys, I am having some trouble with my little facebook application, I keep getting this friggin error, "Fatal error: Call to undefined method Facebook::require_login()", now the funny bit is that my exact same code is working for other people, but not for me, here is the code.

<?php
require_once( "facebook-php-sdk/src/facebook.php" );
$api_key = "my_api_key";
$secret = "my_secret_key";

$facebook = new Facebook( $api_key, $secret );
$user_id = $facebook->require_login();

echo "Hello World";
echo "Current logged in as <fb:name uid=\"$user_id\" />";
?>

As you can see it is a simple hello USER application, but for some reason this REFUSES to work for me, so if anyone can help out that would be great, thanx in advance!

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook