3

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!

Philip
  • 5,011
  • 2
  • 30
  • 36
Julie Holt
  • 31
  • 1
  • possible duplicate of [Facebook API error 191](http://facebook.stackoverflow.com/questions/4691782/facebook-api-error-191) – Igy Jul 02 '12 at 11:13

3 Answers3

1

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

Community
  • 1
  • 1
Philip
  • 5,011
  • 2
  • 30
  • 36
0

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>
ShawnDaGeek
  • 4,145
  • 1
  • 22
  • 39
  • 1
    I have never done a script in facebook before. Where do I go from the dashboard to get to that? – Julie Holt Jul 01 '12 at 20:39
  • is is a full sample, see refer to: for more info on javascript sdk. – ShawnDaGeek Jul 01 '12 at 21:01
  • I just don't know how to get into the facebook area for the java on the app page - I can edit the page of mine. Where is this? From the app dashboard? – Julie Holt Jul 02 '12 at 21:51
  • i am sorry Julie, i was refering to an external website. I just realized you are trying to modify Facebook itself on the site, you can not do that at this time. http://anotherfeed.com at top left by logo is Add! button. :-) – ShawnDaGeek Jul 04 '12 at 15:07
0

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.