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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:11:39+00:00 2026-06-06T07:11:39+00:00

because when I use the function getUser () do not get the correct id?

  • 0

because when I use the function getUser () do not get the correct id? receipt is the id of the person logged on to work earlier and I have to reload the page.
how to make without loading the page 2 times I return the correct id?

  • 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-06T07:11:41+00:00Added an answer on June 6, 2026 at 7:11 am

    Facebook::getUser() (if you use original PHP-SDK) retrieves the details of user from:
    * URL arguments
    * Cookies set by Facebook JS-SDK or PHP-SDK
    * Application session

    So unless active session (not Facebook session, but one for your application) present and contain all the details required to identify your user there is no way to know his Facebook’s user id.

    If you not able to get user id by calling getUser it means non of that data exists at the moment, and you will need to authenticate user:

    • Redirect user to URL returned by Facebook:getLoginUrl()
    • Wait for JS-SDK automatically updates user login status (if status:true was passed to FB.init)
    • Call FB.getLoginStatus (JS-SDK) manually

    To be albe to retrieve user’s details before loading the same twice you have two options:

    1. Increase sessions lifetime in your application
    2. Redirect user to URL returned by Facebook:getLoginUrl() (well this will load your page twice but the on the first time only redirect will be triggered), authorization flow will just drive user back to your application with all details required for his identification.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Because codenameone can not use external libraries (HttpConnection) then I have to use the
I can't use EditorFor because my inputs have some other attributes like readonly ,
I thought it is pretty cool to use the gets() function because it is
I want to use Javascript Alert function in my ASP.NET page. For example like
I have a problem with explode() function. I use the function to explode strings
I have a very simple decorator function I use to expose functions defined in
I am running on proxy and when i use function file_get_contents i get error
My UsersControllerTest currently fails because I use verify_recaptcha in UsersController#create. How can I write
I'm learning Objective-C using GNUstep(because I use Linux). I was thinking in create a
I'm having a document.body is null error in my javascript because I use: $(window).width()

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.