Facebook PHP SDK 3.0 - cancel_url
I have my facebook app in a tab on my facebook page. If you are a new vi开发者_高级运维sitor, the iframe application asks for the permmision. And if I cancel this authorization I wanna redirect user to my facebook page. Is it possible? The old SDK used cancel_url or something like this.
try this.
if(isset($_REQUEST['error'])) {
header('Location: ' . $your_facebook_page);
}
if the user don't allows permission facebook will redirect him to your redirect_uri from there u can see if there is an error and the redirect the user
EDIT:
sorry i forgot it's an iframe app so instead of header('Location: ' . $your_facebook_page);
use this echo '<script>top.location.href="' . $your_facebook_page . '"</script>';
精彩评论