facebook page tab application request
-
24-05-2021 - |
Pregunta
I have a application running in a page tab when in my flow i ask the user to send his friends an app request "my friend" gets the request but when he clicks the request he is brought to the app standalone , not the app running in the page tab
so i thought i can enter a redirect_uri and i put there the link of the page tab application but then facebook complains
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.
has anyone an idea?
Solución
Your redirect_url must be derived from your site URL, callback URL, etc (something your app 'owns') Redirect them to a page on your server and then bounce them back to the page tab if you need to for some reason
Otros consejos
I thumbs-up Igy's answer... which worked (in the end) for me. Here are some DETAILS, in case my specific solution throws some light on yours.
In my app definition, i have
Page Tab URL: http://tangolausanne.ch/test/app_pagetab/index.php
Site URL: http://tangolausanne.ch/
Then I prepared a login url like this:
$params = array(
'scope' => '',
// this fails:
//'redirect_uri' => 'http://www.facebook.com/tangolausannepage/app_135958839864443'
//this works
'redirect_uri' => 'http://tangolausanne.ch/test/app_pagetab/post_oauth.php'
);
$loginUrl = $facebook->getLoginUrl($params);
And later in the index.php of the app_pagetab/index.php, I have this:
<a target="_top" href="<?php echo $loginUrl; ?>">Continue (login)...</a>
Finally, I created a post_oath.php with the following in it:
<?php
header("Location: http://www.facebook.com/tangolausannepage/app_135958839864443");
exit;
?>
So when non-auth'd facebook users it my tab-app on http://www.facebook.com/tangolausannepage (the big red button) they get the login link, followed by the oauth, followed by a fast page redirection back to the app inside the pagetab on facebook. Cosmetically it seems to work for the moment. Good luck to you.
shawn