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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:04:57+00:00 2026-06-19T04:04:57+00:00

I have used a very simple code for my php app, which actually does

  • 0

I have used a very simple code for my php app, which actually does nothing but displays the user ID. I have not considered any security measures because I am just testing this app.

I am allowing the user to login clicking on a link and after allowing access to my app, the user is redirected to the home page and his/her user ID is displayed.

however, the logout url I have included destroys the users facebook session.

I want something different . I want to revoke the access of that app from that user when the user clicks on Logout. Is it possible?

<?php

require './src/facebook.php';

$config = array();
$config['appId'] = '542738299083506';
$config['secret'] = '********************************';
$config['fileUpload'] = false; // optional

$facebook = new Facebook($config);

$loginUrl = $facebook->getLoginUrl(array(
    'scope' => 'publish_stream,publish_actions'
));


?>
<a href="<?php echo $loginUrl; ?>" target="_TOP">Login With Facebook</a>
<?php

$user = $facebook->getUser();

print_r($user);

$logoutUrl = $facebook->getLogoutUrl();

?>

<a href="<?php echo $logoutUrl; ?>" target="_TOP">Logout</a>
  • 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-19T04:04:58+00:00Added an answer on June 19, 2026 at 4:04 am

    You want something like this…

    $facebook->api('/me/permissions', 'DELETE');
    

    Calling this will revoke the app permissions for the current user. If you want to revoke from another user replace me with the profile id.

    You can de-authorize an application or revoke a specific extended permissions on behalf of >a user by issuing an HTTP DELETE request to PROFILE_ID/permissions with a user access_token >for that app.

    Parameter Description Type Required permission The permission you wish to revoke. If you >don’t specify a permission then this will de-authorize the application completely. string >no You get the following result.

    Description Type True if the delete succeeded and error otherwise. boolean

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

Sidebar

Related Questions

I have a very simple SQL query that I made which retrieves some user
I have a very weird problem with PROLOG. I have used it before, but
Today I found a very mysterious bug in the code. I have used the
I have not used jquery much yet and not very familiar with it. Trying
I have a PHP form that needs some very simple validation on submit. I'd
This javascript I have is supposed to be very simple. It is, but IE
This might come across as a simple question, but I have very limited experience
I have used InfoBox successfully in a fairly simple application but I am struggling
I built a very simple app using a PHP form with a bit of
I am very new to this and have used the Qt Designer to make

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.