views:

1260

answers:

3

Error

API Error Code: 100 API Error Description: Invalid parameter Error Message: next is not owned by the application.

Above it the error that I receives when I write the following code in my index.php file.

< ?php

$appapikey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

$appsecret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

require_once 'facebook.php';

$facebook = new Facebook ($appapikey, $appsecret);

$user = $facebook->require_login();

echo $user;

?>

A: 

Is your connect URL correctly registered?

Yuliy
Yes, it is because when I write any other code which doesn't include it.. it works absolutely fyn
abhishekgupta92
+1  A: 

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.

philfreo
Yeah.. but i m quite used to use fbml so it will be a l'll difficult for me to get used to this api
abhishekgupta92
Is there no way out to do this in fbml.
abhishekgupta92
+2  A: 

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.

kylex

related questions