Reputation: 31
I am trying to add an app to my page.
Ive tried: http://www.facebook.com/dialog/pagetab?app_id=####&next=http://www.facebook.com/evendark http://www.facebook.com/dialog/pagetab?app_id=####&next=www.facebook.com/evendark
I get
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.
What am I doing wrong? this always worked before and thats all any of the search sites do. All I want is an iframe displayed as a tab. Thats all. Nothing fancy. I know the ID I am using is the right one Ivee done this before. UGH!
Upvotes: 3
Views: 382
Reputation: 124
The redirect_uri
parameter must be the url where the iFrame is hosted. In my case, setting the variable to the facebook app url returned an error.
I had to delete the tab, and then set it again to the iframe page, i.e. www.domain.com/iframe.php.
One detail, I initially created the iframe page as a static page, i.e. iframe.htm, which led the tab to display an error message 'incorrect function', since these pages MUST be served by a dynamic page server, such as ASP or PHP.
Upvotes: 0
Reputation: 4150
to add an app page tab to a page, try using js sdk with the following. NOTE: you will need to goto the page and add manually from admin settings under applications.
refer to: https://developers.facebook.com/docs/reference/javascript/
<div id="fb-root"></div>
<button onclick="addToPage();">Add Tab to Page</button>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID', // App ID
channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<script>
function addToPage() {
// calling the API ...
var obj = {
method: 'pagetab',
redirect_uri: 'http://anotherfeed.com/',
};
FB.ui(obj);
}
</script>
Upvotes: 0
Reputation: 5021
After you have set the Site URL
in Facebook Settings,
you can add this url in the redirect_uri
parameter.
Similar questions:
Facebook API error 191
API Error Code: 191
Invalid redirect_uri: Given URL is not allowed by the Application configuration
Upvotes: 1