开发者

Error code 100 while writing a code for Facebook API

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜