"Call to undefined method" in my Facebook application
- by Robert
I have written my first php script to learn facebook API stuff. It goes like this:
<?php
require_once('facebook/client/facebook.php');
$facebook = new Facebook(
'0fff13540b7ff2ae94be38463cb4fa67',
'8a029798dd463be6c94cb8d9ca851696');
http://stackoverflow.com/questions/ask
$fb_user = $facebook->require_login();
?>
Hello <fb:name uid='<?php echo $fb_user; ?>' useyou='false' possessive='true' />!
Welcome to my first application!
I put "facebook.php" in the same directory as my php script.
However, after I deploy the php on a web server and link it with facebook and run it, I get an error saying:
"Fatal error: Call to undefined method
Facebook::require_login() in
/home/a2660104/public_html/facebook-php-sdk-94fcb13/src/default.php
on line 16"
Could anyone help me a bit on this? I am a beginner to the facebook app programming.