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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:30:55+00:00 2026-05-27T23:30:55+00:00

I am tweaking my application with some extra code, like checking if the permissions

  • 0

I am tweaking my application with some extra code, like checking if the permissions we need have been allowed by the user (maybe he has changed it after his first visit).

$permissions_needed = array('publish_stream,read_stream');
foreach($permissions_needed as $perm) {
   if( !isset($permissions_list['data'][0][$perm]) || $permissions_list['data'][0][$perm] != 1 ) {
      $login_url_params = array(
         'scope' => 'publish_stream,read_stream',
         'fbconnect' =>  1,
         'next' => 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']
        //redirect_uri => 'https://www.mydomain.com/fb_app/'
      );
      $login_url = $facebook->getLoginUrl($login_url_params);
      header("Location: {$login_url}");
      exit();
   }

How do i fix this? And when to use next vs redirect_uri as params?

  • 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-27T23:30:56+00:00Added an answer on May 27, 2026 at 11:30 pm

    Why dont you only prompt your users to allow extended permissions (or any permission) only when they are performing the action that requires that permission?
    Here is a link to a SO Question detailing how to request permissions with the Facebook JS SDK.

    If your use removed a certain permission it might have been because he/she did not know why your application needs that permission. By requesting for the permission only when the user performs that action, and maybe including a short explication on why you are requesting this permission, the users might be inclined to re-allow your application the permission in debate.

    EDIT
    For re-directions I usually use a JS redirect. Like this :

    $url = $facebook->getLoginUrl(array(
          'req_perms' => implode(",",$requiredPermissions), 
          'fbconnect' =>  1,
          'redirect_uri' =>'YOUR_URL'
        ));
    echo "<script language=javascript>";
    echo "top.location.href = '".$url."';";
    echo "</script>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm tweaking a WinForms application. This application has a Form that contains a PropertyGrid
After some tweaking of some code I got from someone to cause a characters
I have written an application that changes some of the registry settings and then
I have a table with some 30 columns, already used in the application extensively.
I have been developing and tweaking things as much as I can and know
I have currently been working on a web application which features a dynamically updating
I have a Flex/Actionscript 3 application that displays RSS feeds in a Text element.
I have a large application (~50 modules) using a structure similar to the following:
I would like to host an application window from a process A into the
I'm using the following code: <?php $data = $_REQUEST['datatodisplay']; header(Content-Type: application/vnd.ms-excel); header(Content-Disposition: attachment; filename=Data.xls);

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.