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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:42:42+00:00 2026-05-27T05:42:42+00:00

After I click on my logout button, it redirects me to: https://www.facebook.com/home.php . Why

  • 0

After I click on my logout button, it redirects me to:
https://www.facebook.com/home.php. Why is it that when I return to my app domain, I can still see the logout button…?

Here is my code:

<?php
//User login/logout buttons
if($user) {
    echo '<a href="'.$facebook->getLogoutUrl(array('next' => 'myurl.com/facebook/')).'"><img src="src/logout-fb.png" alt="Facebook Logout Button" /></a>';
}else{
    $params = array(
        scope => 'user_photos, publish_stream',
        redirect_uri => 'http://myurl.com/facebook/'
    );
    $loginUrl = $facebook->getLoginUrl($params);
    echo '<a href="'.$loginUrl.'"><img src="src/login-fb.gif" alt="Facebook Logout Button" /></a>';
}
?>

Thanks in advance.

  • 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-27T05:42:43+00:00Added an answer on May 27, 2026 at 5:42 am

    I had the same problem:

    When clicking on my logout link, Facebook ignored the “next” parameter, did not logout and redirect to facebook.com/home.php.

    I added a final slash to my “next” URL and it solved my problem.

    There is my code:

    $client = facebook_client();
    if($client){
      session_destroy();
      $url = $client->getLogoutUrl(array('next' => $base_url.'/')); //added a slash
      ... //Redirect to $url
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a button that starts my php script after I click
I am creating an application that sends SMS while after click on a button.
I'm creating a Tic tac toe game, in that after click made by user
for example, I have a textfield, that records the user name, after I click
I need to click an html button and navigate to another page. After click
I have small problem with http 404 error, after click on 'allow' on facebook
I want After click on the radio, Radio-selected that background color is yellow putting
I want After click on the radio, Radio-selected that background color is yellow putting
I want after click on button(Click Me), validation check just for field 2-1 and
I am using the following android fb connect library. http://github.com/facebook/facebook-android-sdk/ problem is after successful

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.