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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:32:07+00:00 2026-06-08T09:32:07+00:00

I am just creating a facebook tab on a users page. I am using

  • 0

I am just creating a facebook tab on a users page.
I am using the php facebook SDK, and this little snippet(see below) from the tutorials.
My question is , if the user is logged into FB and comes back to my page later $user is not found and they have to connect again. Is there not a way to know that they are already logged in and already granted me access?

I hope this question makes sense

$facebook = new Facebook(array(
    'appId'  => FB_APP_ID,
    'secret' => FB_APP_SECRET,
    'cookies' => 'true'
));
$user = $facebook->getUser();

if ($user) {
    $logoutUrl = $facebook->getLogoutUrl();
} else {
    $loginUrl = $facebook->getLoginUrl(array('scope' => 'publish_stream, manage_pages'));
}
  • 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-08T09:32:08+00:00Added an answer on June 8, 2026 at 9:32 am

    Nope, it won’t be done automagically on server-side. To know who user is – you need to ask them to follow the login url

    OR

    use JS SDK. In that case user is logged in automatically and all you need is to refresh the page by JS (there is an example shipped with php sdk on how to do that)

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

Sidebar

Related Questions

Hi I just define my custom action on facebook using open graph. After creating
I'm just creating my own AboutBox and I'm calling it using Window.ShowDialog() How do
Essentially, I am just creating two classes where one class, in this case class
I have just finished creating an API where the requests from the API are
I'm trying to get just a piece of information from Facebook, but I don't
I'm creating a Facebook-Like chat. It gets the latest messages Not Read from a
I am busy creating my very first Facebook application, and although I have PHP
I’ve just created a facebook app, all was smooth till spot on this strange
I'm creating an app that will need users to create an account. (Like Facebook
I am creating a Facebook App using Django. When I access my webpage directly

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.