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

  • Home
  • SEARCH
  • 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 7217821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:24:07+00:00 2026-05-28T21:24:07+00:00

Couldn’t find similar enough question so I’ll ask. I’m trying to use facebook log-in

  • 0

Couldn’t find similar enough question so I’ll ask.

I’m trying to use facebook log-in on my page.

I did everything according the the developer’s guides.
However, I’m not sure when I can start calling FB.API calls. when is the user authenticated? how can I know when this operation was done?

<script>
    window.fbAsyncInit = function () {
        FB.init({
            appId: 'someID', // App ID
            channelUrl: '//www.domain.com/channel.html', // Channel File
            status: true, // check login status
            cookie: true, // enable cookies to allow the server to access the session
            xfbml: true  // parse XFBML
        });

    };

    // Load the SDK Asynchronously
    (function (d) {
        var js, id = 'facebook-jssdk'; if (d.getElementById(id)) { return; }
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        d.getElementsByTagName('head')[0].appendChild(js);
    } (document));
</script>

now I want to call this

    FB.api('/me', function (response) {
        facebookUser = response; 
        alert('Your name is ' + response.name);
    });

but not sure when is the write time. I get undefined wherever I put it :/

  • 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-28T21:24:08+00:00Added an answer on May 28, 2026 at 9:24 pm

    You will want to run the FB.getLoginStatus() (https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/) before you send the user to log in using FB.login() or if the user is logged in, to call the FB.api() method.

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

Sidebar

Related Questions

couldn't find similar posts, so posting my own question. I got variable array of
I couldn't find anything similar to this anywhere. I have an array of pointers
I couldn't find any information in the reference page of MPMoviePlayerController or in the
I couldn't find a straight answer to my question and need to know it
Couldn't find a better place to ask this so I hope you guys can
I couldn't find a good question/title for what I want to do. I'm not
Couldn't find this anywhere, maybe I'm looking for the wrong verbs. I'm trying to
Couldn't find an answer to this question. It must be obvious, but still. I
Hi couldn't find it for C#, I am trying something like that for (int
I couldn't find enough resource about this subject and i need to learn how

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.