My Code:
$url = $fb->getLoginUrl(array('scope'=>'email','next'=>'http://apps.facebook.com/APPID/'));
echo "<script> top.location=\"".$url."\"; </script>";
I need to redirect the user to apps URL of my application when authetication is successfull but it always redirect to my redirect_uri page.
how can i fix it?
thanks.
You have to change this URL to redirect you app where you want after authentication.
OR You can Do this
First of all, you don’t have to edit PHP SDK, below is the sample for authenticating the user and then redirecting to your landing page,
Make sure you replace:
YOUR-APP-ID-HERE with Your facebook application id,
YOUR-APP-API-SECRET-HERE with Your facebook application secret key
YOUR-REDIRECT-URL-HERE with Your landing page URL
If you want to get extended permissions, then simply add another “scope” parameter to the login url, ex: