I\'ve been following the steps outlined here to create a Facebook App Login: http://developers.facebook.com/docs/howtos/login/server-side-login/
And am on Step 3. I
this code worked for me. double check your facebook app id and my site url is set to http:// localhost:8052/ dont really need to set domain name for login thanks
http://gamma.owlweb.com.ua/index.php/?route=account/register/fb
<?php
$app_id = "xxx"; $app_secret = "xxx";
$my_url ="http://localhost:3080/abc.php";
session_start();
$code = '';
if(!isset($_REQUEST["code"])) {
$_SESSION['state'] = md5(uniqid(rand(), TRUE)); // CSRF protection
$dialog_url =
"https://www.facebook.com/dialog/oauth?client_id=".$app_id
."&redirect_uri=".urlencode($my_url)
."&state=".$_SESSION['state'];
echo $my_url.'<br/>';
echo $dialog_url.'<br/>';
echo("<script> top.location.href='" . $dialog_url . "'</script>");
}
?>