tags:

views:

909

answers:

2

I am trying to set up a basic Facebook application using PHP and an external .swf this line $user_id = $facebook->require_login();

creates this error:

Fatal error: Call to undefined method Facebook::require_add() in C:\httpdocs\facebook_application\index.php on line 10

I cannot find the cause of this error...

+1  A: 

Sounds like you're using old versions.

Download the latest 'Facebook Platform' and also make sure you have the latest PHP5.

zaf
+1  A: 

I found out they changed everything lately.

$facebook =    
new Facebook(array(
  'appId' => 'xxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxx',
  'cookie' => true,
));      
$session = $facebook->getSession();

This one worked with the new version!

Dimitree