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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:35:28+00:00 2026-05-13T18:35:28+00:00

I am facing an error with my web app that uses Facebook connect that

  • 0

I am facing an error with my web app that uses Facebook connect that occurs when the user has both my web app open and Facebook.com open and logs out of Facebook.com. Since my app and the Facebook Connect library is unaware that the session is no longer valid, when it tries to user certain Facebook Connect functions that require a valid session, I get a ‘FacebookRestClientException’ with message ‘Session key invalid or no longer valid.’ Just wondering what the best practice is for handling this case for a php app.

From Googling I found that there’s a JS function that pings the Facebook server to see if a user is logged in but I need a server side solution.

  • 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-13T18:35:28+00:00Added an answer on May 13, 2026 at 6:35 pm

    use:

    $fb_user=$facebook->get_loggedin_user();
    

    this will tell you the facebook_uid of the logged in user or return false if not logged in.

    example:

    $fb_user=$facebook->get_loggedin_user();
    
    if($fb_user)
    {
        try{
            $setstatus = $facebook->api_client->users_setStatus(
                $status,
                $facebook_uid
                );
            echo 'status has been updated';
        }catch (Exception $e) {
            if($e->getCode() === 102)
            {
               // user is not logged in
               echo 'you must log in to update your status';
            }
            log_error($e->getMessage()); // log your error so you can fix it if you need to
        }
    }else{
        echo 'you must log in';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm facing the following problem : my app has to load some web-content and
The scenario I am facing is that I have an ASP.NET web service (.NET
We are facing one problem with facebook. we integrated FB in our web application,
I am facing an strange issue. I developed java web app in java 6
I am facing a weird problem. My web application throws error Value to add
We're facing a sever timeout error on NopCommerce - ASP.net MVC3 web application. The
I am facing error C2065: 'IOCTL_NDISUIO_OPEN_DEVICE' : undeclared identifier error in beneath code. Where
I am currently facing an error called Bad Base64Coder input character at ... Here
I didn't understand ..why I am facing this error.. Here is my code: package
Since yesterday, I've been facing a compiling error for my C project. The project

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.