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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:12:17+00:00 2026-06-05T15:12:17+00:00

I am trying to extract the facebook id from an iframe in order to

  • 0

I am trying to extract the facebook id from an iframe in order to update a module which will display on the user’s website and link to the fb page.

For example, when I load this iframe:

<iframe src=https://graph.facebook.com/zuck></iframe>

You can see that Mark Zuckerberg has the id of 4. I would simply like to pull this value out of the iframe and assign it to a variable via php. Any ideas on how this can be done?

  • 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-05T15:12:18+00:00Added an answer on June 5, 2026 at 3:12 pm

    You can do this pretty easily using the FB javascript API.

    In your head, add a JS block with:

    window.fbAsyncInit = function() {
        FB.api("/zuck", function(response){
            alert(response.id);
        });
    };​
    

    … replace zuck with the wanted username, eg. “/” + USERNAME

    Async load the FB JS …

    <script type="text/javascript">
    // 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>​
    

    Since ID is a public field, you don’t need any extra user login stuff; you can just make a call.

    Please note … that is MISSING some usual FB stuff:
    FB.init – since we don’t need to do any user session related stuff.
    [div id=”fb-root”][/div] – since we aren’t showing any stuff from FB; dialogs, etc. (but with square brackets! 😛 )

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

Sidebar

Related Questions

Hi I'm trying to extract the university of the user from their Facebook profile
I am trying to extract the page name from a complex url. This post
I am trying to extract some info from a website using simple_html_dom. Currently I
I am trying to extract from a webpage which has the following markup <div
I'm trying to figure out how to get the page name from a facebook
im trying to extract an info hash from a torrent magnet link using perls
I'm trying to extract all matches from a EBML definition, which is something like
I'm trying to extract data from the following page: http://www.bmreports.com/servlet/com.logica.neta.bwp_PanBMDataServlet?param1=&param2=&param3=&param4=&param5=2009-04-22&param6=37# Which, conveniently and inefficiently
I am trying to extract Facebook ids from a list of emails using the
Im trying to extract a YouTube link from just random text. e.g. This is

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.