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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:06:43+00:00 2026-06-04T15:06:43+00:00

I am trying to create an iframe tab for a Facebook Page. On this

  • 0

I am trying to create an iframe tab for a Facebook Page.

On this page, I am loading in an iframe which consists of a form from another domain/site.

Is it possible to use javascript to query the graph api to load the user’s data into this iframe loaded form using javascript such that is appears pre-populated to the user?

I am aware that there is a cross domain security issue. In that case, suppose that my iframe tab is now hosted on the same domain as the iframe loaded form, will this be doable now?

  • 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-04T15:06:43+00:00Added an answer on June 4, 2026 at 3:06 pm

    You are right, what you want will be blocked by the browser due to security reasons (same origin policy).

    What you can do:

    1. Reload the form in the iframe and pass it the data you get from the js sdk, you can even POST the data into the iframe (like facebook does with canvas apps).

    2. You should be able to change the location of the iframe, but just the hash part (fragment), which will not cause the iframe to reload.
      In the iframe be aware of location changes and extract the data from the fragment.
      The problem is that this method will probably mess up with the browser history.

    3. Find another solution for cross domain communication, maybe easyXDM?


    Edit

    Here are two implementations of the first option:

    1) Using GET

    <iframe id="userform"></iframe>
    
    <script type="text/javascript">
        // load and init FB JS SDK
    
        FB.api("me", function(response) {
            document.getElementById("userform").src = USER_FORM_URL + "?name=" + response.name;
        });
    </script>
    

    2) Using POST into the iframe

    <form method="POST" action="USER_FORM_URL" target="userform" id="postForm">
        <input type="hidden" name="fbResponse" id="fbResponseInput" />
    </form>
    
    <iframe name="userform"></iframe>
    

    Then, on the iframe itself, get the data (either from GET or POST) and render the user form accordingly.

    <script type="text/javascript">
        // load and init FB JS SDK
    
        FB.api("me", function(response) {
            document.getElementById("fbResponseInput").value = JSON.stringify(response);
            document.getElementById("postForm").submit();
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a simple iFrame custom tab on my fan page. I'm
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
I'm trying to create a widget (which is basically an iframe) that would have
I am trying to create a Facebook iFrame app. The app should first show
I'm trying to create an iframe from JavaScript and fill it with arbitrary HTML,
I have a sales page on my site which I am trying to configure.
Trying to create Database as follows: USE Master GO IF NOT EXISTS(SELECT [Name] FROM
Trying to create a macro which can be used for print debug messages when
Trying to create a background-image slideshow and am getting this error... This is the
I'm trying to create a simple file upload form for my website. I'm 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.