Facebook App Login
I downloaded the API from Facebook and tried to login with it. I get an loop which try to authentificate me all the time ( link text )
How can I login with facebook without getting this loop? ( I finall开发者_运维知识库y want to get my notifications and messages an i want to post something. )
Greets Dom
you need request for api key and secret code from facebook developer site/app (http://www.facebook.com/developers/). in the code you mentioned, $api_key and $secret should be initialized with your api and secret code. Cheers!
<?php
require('config.php');
require_once('api/facebook.php');
$facebook = new Facebook($api_key,$secret);
$fb_user = $facebook->require_login();
?>
Hello <fb:name uid='<?php echo $fb_user; ?>' useyou='false' possessive='true' />! Welcome to my first application!
<?php
echo "<pre>Debug:" . print_r($facebook,true) . "</pre>";
?>
精彩评论