tags:

views:

420

answers:

1
include_once 'facebook.php';

 $fb = new Facebook('api_key', 'secret');

 $user = $fb->require_login();

 echo $fb->api_client->user;

 echo $fb->api_client->session_key;

Whats wrong with the above code? when i first go to the page , it takes me to the facebook for login, after i login, its falling in infinite loop. how can make it print my values??

A: 

What about require_frame?

include_once 'facebook.php';
$fb = new Facebook('api_key', 'secret');
$fb->require_frame();
$user = $fb->require_login();
echo $fb->api_client->user;
echo $fb->api_client->session_key;
Sarfraz
Man, whats with the require_frame(). iam not using any frames, just wanted to print my values. do you think it is necessary??
Megan
you should give it a try, we need that in our fb apps.
Sarfraz