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 have a public facing website that has been receiving a number of SQL
I am facing an application that uses hashing, but I cannot still figure out
I'm trying to create a rails web app that does not use ActiveRecord framework
I have a web application on ASP.NET (C#) that has some precompiled components. I've
I am facing an strange issue. I developed java web app in java 6
I'm facing a problem while unit testing my forms. The problem is that data
I'm working on a class-based php web app. I have some places where objects
I am new Web App development using Flex Builder 3 and currently I am
Recently deployed my web app on Windows Server2008, IIS7 (with Office installed). After chasing
I am developing web based application in Java [GWT] I am facing problem with

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.