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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:03:06+00:00 2026-06-04T06:03:06+00:00

in order to check if the user has provided all the permissions i need

  • 0

in order to check if the user has provided all the permissions i need for my app, I do it so:

/*Solo hacemos la peticion si el checkbox estaba desmarcado. Nota: esta funcion asume que solo hay un checkbox en el dom*/
if($('input:checkbox').prop('checked')){
    FB.login(function(response){
             console.log(response.status);
            if (response.status == 'connected') {
            hi   /* Entonces listo */
            }else{
                 /* Entonces cancelamos el checkbox */
                 $('input:checkbox').removeAttr('checked');
            }
    }, { scope: 'publish_stream' });
}

This way:

  • if user did it allready: a popup is opened for less than a second

  • if user didnt yet: the permission dialog is shown

Question is: how can i prevent the dialog to be opened (maybe running it in the background) in the first case?

  • 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-04T06:03:07+00:00Added an answer on June 4, 2026 at 6:03 am

    You cannot stop a popup when you use FB.login.

    Either use a server side authentication or use FB.getLoginStatus to prevent popup in first case.

    FB.getLoginStatus allows you to determine if a user is logged in to
    Facebook and has authenticated your app

    Refer Facebook docs

    A snippet from the above reference link,

    FB.getLoginStatus(function(response) {
      if (response.status === 'connected') {
        // the user is logged in and has authenticated your
        // app, and response.authResponse supplies
        // the user's ID, a valid access token, a signed
        // request, and the time the access token 
        // and signed request each expire
        var uid = response.authResponse.userID;
        var accessToken = response.authResponse.accessToken;
      } else if (response.status === 'not_authorized') {
        // the user is logged in to Facebook, 
        // but has not authenticated your app
      } else {
        // the user isn't logged in to Facebook.
      }
     });
    

    This is what you need.

    Edit: (after OP’s comment)

    May be facebook is caching old result.
    From the same link I mentioned above,

    Roundtrips to Facebook’s servers

    To improve the performace of your application, not every call to check
    the status of the user will result in request to Facebook’s servers.
    Where possible, the response is cached. The first time in the current
    browser session that FB.getLoginStatus is called, or the JD SDK is
    init’d with status: true, the response object will be cached by the
    SDK. Subsequent calls to FB.getLoginStatus will return data from this
    cached response.

    This can cause problems where the user has logged into (or out of)
    Facebook since the last full session lookup, or if the user has
    removed your application in their account settings.

    To get around this, you call FB.getLoginStatus with the second
    parameter set to true to force a roundtrip to Facebook – effectively
    refreshing the cache of the response object.

    FB.getLoginStatus(function(response) {
          // this will be called when the roundtrip to Facebook has completed
        }, true);
    

    If you call FB.getLoginStatus on every page load, be careful not to
    set this parameter for each as it will significantly increase the
    number of requests to Facebook’s servers, and thus decrease the
    performace of your application.

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

Sidebar

Related Questions

On a webshop, I need to check if the user has checked this payment
My application has a delete user option. Now in order to check concurrency condition
I wanted to check if user has entered the input in particular order or
In order to check if an input field is empty or has any value,
In some of my tests i need to check the order of Lists and
I'm building a facebook connect app to publish content to user's streams. In order
How can an application check if the user has the correct key? certificate and
I need a I accept terms of service checkbox on a page, it has
I use the following code in order to check if certin user exists in
I need help on displaying one random result in which the current user has

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.