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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:24:37+00:00 2026-06-06T04:24:37+00:00

I have this button: <img src=static/img/facebook_button.png id=login-fb onclick=login(); /> I also have this script:

  • 0

I have this button:

<img src="static/img/facebook_button.png" id="login-fb" onclick="login();" />

I also have this script:

window.fbAsyncInit = function(){
    FB.init({
        appId : 'MY_APP_ID',
        status : true,
        cookie : true,
        xfbml : false
    });
};

Finally, I have this function:

function login()
{
    facebookPerms = [
        'user_photos', 'email', 'offline_access', 'user_relationships', 'read_stream',
        'user_about_me', 'user_birthday', 'user_education_history', //'publish_stream',
        'user_hometown', 'user_interests', 'user_location', 'user_likes',
        'user_religion_politics', 'user_activities', 'user_work_history'
    ];
    //Get the facebook login status
    FB.getLoginStatus(function(response) {
        if (response.session) {
            // logged in and connected user, someone you know
            ajaxLogin();
        } else {
            //Display the facebook login dialog
            FB.login(function(response) {
                if (response.authResponse) {
                    // user is logged in and granted some permissions.
                    // perms is a comma separated list of granted permissions
                    ajaxLogin();
                } else {
                    // user is not logged in, display the error dialog box
                    errorNotLogged();
                }
            }, {
                //Ask for permissions of Facebook
                scope: facebookPerms.join(',')
            });
        }
    });
}

I am following this Facebook rule:

Calling FB.login results in the JS SDK attempting to open a popup
window. As such, this method should only be called after a user click
event, otherwise the popup window will be blocked by most browsers.

And my website still gets its Facebook popup blocked in IE9. Any ideas how to solve this? Any ideas how other people do this without having their scripts being blocked?

  • 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-06T04:24:38+00:00Added an answer on June 6, 2026 at 4:24 am

    Try the following:

    • Fetch the user login status.
    • If the user is not logged in, show a login button.
    • On click call the FB.login function directly.

    In your implementation FB.login is not called directly after a user interaction, but as a part of a callback function of FB.getLoginStatus. I guess this causes IE to block the popup.

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

Sidebar

Related Questions

I have this situation: $(#button).toggle(function(){ $(#window).animate({top:'0%'},1000); },function(){ $(#window).animate({top:'-100%'},1000); }); but I need change it
I have an image <img id='my_img' src='img1.png'> and a button. Clicking the button does
I have the following html structure: <div> <button> <img src=img/a.png /> </button> <h2>Title</h2> </div>
I have around 8 img src tags that start like this: <img src= id=joinCityResponse
I have this button on the leftside of my UISplitViewController (RootViewController) that has a
I have this button which is not working correctly for hold button for a
i have this button xml, when it be will pressed, the pressed image(b) would
So I have this hidden form and this 'I like this' button that I
I am stuck at a small problem. I have this button within a form
I have an add this button on the website that is rendering a border

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.