Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9179129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:43:15+00:00 2026-06-17T17:43:15+00:00

Possible Duplicate: Facebook API error 191 I am getting the following error with some

  • 0

Possible Duplicate:
Facebook API error 191

I am getting the following error with some code that I am using. The error is

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.

<?php   
$facebook = new Facebook(array('appId' => $app_id,'secret' => $app_secret,'cookie' => true));
if($facebook->getUser() < 1)
{
    $red_url = $page_url.'?sk=app_'.$app_id;
    $redir = $facebook->getLoginUrl(array('redirect_uri'=>$red_url,'next'=>$red_url,'scope'=>'offline_access,publish_stream,status_update,photo_upload,user_birthday'));
    echo "<script>top.location.href='".$redir."';</script>";
    exit;
}
$user = $facebook->api('/me');

Can any one explain how to get around this and why this happens?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:43:16+00:00Added an answer on June 17, 2026 at 5:43 pm

    When you open a Facebook application you need to set the domain/s under which your application is intended to run – and (almost) every place that your app gets in contact with facebook (especially client side) must be from a url from the same domain (or a subdomain of it)

    in your case you told asked facebook to authorize the app for the user and then redirect him to $red_url which I understand to be the page where your app is installed – BUT this link is not under the domain of your application (unless you registered facebook.com as your app domain in the application dashboard

    if you want to redirect the user to that specific tab – you may create a proxy file under the domain of your application that will redirect the user to the tab, for example:

    lets say you registered mydomain.com as your app domain in the app dashboard . then – create a file named redirect.php for example that will conatin the following script and put it under http://www.mydomain.com/my_directory/redirect.php :

    <?php
    $app_id ="ENTER_YOUR_APP_ID_HERE";
    $page_url = "ENTER_THE_PAGE_URL_HERE"; //for example: http://www.facebook.com/techmarketing.co.il
    $red_url = $page_url.'?sk=app_'.$app_id;
    
    header("Location: {$red_url}");
    

    and your script will change to be:

    <?php   
    $facebook = new Facebook(array('appId' => $app_id,'secret' => $app_secret,'cookie' => true));
    if($facebook->getUser()==0)
    {
        $red_url = "http://www.mydomain.com/my_directory/redirect.php";
        $redir = $facebook->getLoginUrl(array('redirect_uri'=>$red_url,'next'=>$red_url,'scope'=>'offline_access,publish_stream,status_update,photo_upload,user_birthday'));
        echo "<script>top.location.href='".$redir."';</script>";
        exit;
    }
    $user = $facebook->api('/me');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Facebook API error 191 I'm developing a Facebook app. When I attempt
Possible Duplicate: Facebook online friend I am using the Facebook Graph API and I
Possible Duplicate: How to delete a Facebook comment post using the Facebook GRAPH API?
Possible Duplicate: PHP php://input vs $_POST I'm using the Facebook Real-time updates API to
Possible Duplicate: Accessing numerical property in a json object Using the facebook graph api,
Possible Duplicate: 'Like' a page using facebook graph api I want to let users
Possible Duplicate: How to get friend's birthday list using facebook api? I'm developing an
Possible Duplicate: Google plus api for posting on wall like facebook I have checked
Possible Duplicate: Facebook API: Post on friend wall I'm trying to post the message
Possible Duplicate: Facebook iOS SDK Poke I want to poke a facebook friend using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.