I get this error:
API Error Code: 100 API Error Description: Invalid parameter Error Message: next is not owned by the application.
in this index.php file:
<
?php
$appapikey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$appsecret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
require_once '开发者_StackOverflow中文版facebook.php';
$facebook = new Facebook ($appapikey, $appsecret);
$user = $facebook->require_login();
echo $user;
?>
In the developers section, under your website, go to:
Settings > Web Site >
Site URL: http://example.com
Site Domain: example.com
This error can occur if your domain is listed as http://example.com but you are coming from http://www.example.com. The Site Domain ensures that the subdomain www
gets recognized properly.
While this doesn't directly address your question, might I suggest you use the latest version of the Facebook PHP library, available here:
http://github.com/facebook/php-sdk/
It doesn't have the require_login
method but is lightweight and can handle any API call.
精彩评论