I am working on a facebook app, it takes the oauth from the user. Everything works fine but, When the user reject the popup oauth then it displays:
"Sorry, the details for F_wp_app cannot be displayed because the app is misconfigured."
Here is the code for my index.php file
include_once 'facebook.php';
$user = $facebook->getUser();
if($user)
{
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
ob_end_flush();
}
else
{
$loginUrl = $facebook->getLoginUrl(array(
'scope'=>'publish_stream',
'redirect_uri'=>'https://apps.facebook.com/226166417548050/'
));
echo "<script> top.location='$loginUrl'</script>";
}
I want that if the user rejects the oauth then it is automatically redirected back to the oauth.
Any help would be appreciated. Thankyou