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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:54:40+00:00 2026-06-13T19:54:40+00:00

Same as the title, what situation can use the getUser() function on facebook? P.S.

  • 0

Same as the title, what situation can use the getUser() function on facebook?
P.S. I am using facebook php sdk api.

Why I ask this question is because I found out that if I not place the website inside the facebook.com, then getUser() function will always return null or 0.

Is that true? getUser() function only work in the website which inside the facebook.com?

Thanks. Newbie of facebook

  • 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-13T19:54:42+00:00Added an answer on June 13, 2026 at 7:54 pm

    The getUser method should return the active facebook user id if there’s enough data available to determinate that. This data can come from various places:

    1. signed request – this could come from the oauth authentication flow, or if its a canvas app, facebook embeds it into the http POST when your page gets loaded in the by <iframe>
    2. previously saved session data – if a previous attempt to determinate the user was successful, the resulting user id gets saved into a session variable
    3. access token – in some cases the access token can be used to determinate the user id

    See the getUserFromAvailableData method for exact details, from a developer perspective the getUser() will return the current facebook user’s id when the user is authenticated on facebook, and has your application installed/authorized. To achieve that see the documentation on login, for an external website, the best option is to use facebook’s javascript sdk’s login method to get the data needed for the backend (stored in cookies).

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

Sidebar

Related Questions

There is a question here in stackoverflow with the same title but that is
How do I rewrite this T-SQL code to produce the same results SELECT ACC.Title,
The same way i use this to detect when user scolled down the whole
First of all I'd welcome edits to the title of this question, I couldn't
I think the title for this question is probably wrong, but I'm not sure
I am fetching Google in a gadget using this code: <html> <head> <title>Browser</title> </head>
First of all, my apologies for the title of this question, I don't have
The original question: The title of this question might be a bit clumsily phrased,
I was wondering about the following situation in C#. Sometimes function names can be
I'm sorry for ambiguous title, but this question is hard for me to put

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.