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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:36:18+00:00 2026-05-27T19:36:18+00:00

I’m really new to the Facebook API and am having trouble getting the Facebook

  • 0

I’m really new to the Facebook API and am having trouble getting the Facebook authentication dialog to redirect to the original browser window of my application. Here’s the current process via client-side flow:

  1. User is logged into my application (Ruby on Rails Application with Javascript/Jquery scripting).

  2. User clicks on button in my application to log into his/her Facebook account.

  3. The Facebook Authentication Dialog pops up in a 2nd window, asking user to log in.

  4. User logs into Facebook

  5. The Facebook Authentication Dialog asks the user if he/she wants to grant my application permission.

  6. User clicks ok to share profile information.

  7. The Facebook Authentication Dialog redirects the 2nd window to also open an instance of my application with the access token in the URL.

My questions are the following:

  1. How can I get Facebook Authentication Dialog window to close after the user successfully logs into his/her Facebook account?

  2. How can I gain access to the Facebook Access token after closing the second window?

The best way to illustrate what I’m ultimately trying to do is when somebody is signing into ESPN’s site (1st window). Notice, that a modal window (2nd window) opens where you can click “sign in” (upper right corner) on ESPN’s site. In this modal window, you can sign in with your Facebook account. Clicking on the “Sign in with Facebook Account” link will open a 3rd window which will take you through the Facebook Authentication process. When finished with signing into Facebook, the 3rd window will close and the modal window is updated based on the status of the 3rd window that closed.

How can I get the Facebook Authentication Dialog window to close and redirect to a preceding window?

Thanks!

  • 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-27T19:36:19+00:00Added an answer on May 27, 2026 at 7:36 pm

    Here is what I did in a similar situation. For the facebook dialog, have it redirect to a page on your site then simply grabs the access token and whatever other data you need. (In my case I just sessionized some of the user info). In the output of that page, include some javascript in your document.ready that will close this second window, and redirect to whatever page you want in the first window. It looks somthing like this.

    window.opener.location.href = '/redirect_url_for_first_window'; //set url of the main window
    window.close(); //close the popup
    

    You can use window.opener in a popup window to refer to the window it came from. You can even have your popup window access variables and call functions of the main window as well.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.