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 6208197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:46:03+00:00 2026-05-24T05:46:03+00:00

I need to get the User ID of a user hitting a Facebook iFrame

  • 0

I need to get the User ID of a user hitting a Facebook iFrame application. While sifting through all of the bogus and outdated information, I think I’ve come across the correct info.

When the user hits the page, I need to have them authorize the app. In my PHP I do this:

$facebook = new Facebook($appData);
$user = $facebook->getUser();

if(!$user) {
    echo '<script>top.location.href="'.$facebook->getLoginUrl().'";</script>';
    die();
}

This gives me the authorization request, but then pushes me back to my server, not the iFrame App’s URL (http://app.facebook.com/blah). I manually constructed the URL and tried to set the URL to the app.facebook.com URI but then it I get an error saying the URL is not valid for the app.

How do you get it to redirect back to the app after authorization? This app will live inside Facebook, not be generally accessible outside, so I’m not looking for Facebook Connect login.

Edit

This is the exact error I get when I fiddle with the request_uri:

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.
  • 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-05-24T05:46:04+00:00Added an answer on May 24, 2026 at 5:46 am

    Have you tried setting the redirect_uri parameter.

    if(!$user) {
      $params = array('redirect_uri' => 'http://app.facebook.com/blah/');
      die('<script>top.location.href="'.$facebook->getLoginUrl($params).'";</script>');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello friends i need to get user information from facebook i am using code
I am porting a Windows application to OSX and need to get user's home,
I need to get current user name in my Wss 3.0 application. What is
I need to get user location update when application is in background. I used
I need to get all user groups from liferay portal, but UserGroupServiceUtil from it's
I'm developing application which need access to user's facebook account. It is working, but
i have PostsController controller and in this controller i need get all user list.
In the search API, I need to get user details like facebook.com. If I
I need to get some user information from several tables, but if something is
I need to get the remote user name in my CGI script. Where do

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.