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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:14:26+00:00 2026-05-28T18:14:26+00:00

I am trying to implement Facebook Connect functionality into a website that I am

  • 0

I am trying to implement Facebook Connect functionality into a website that I am working on. The site uses ASP.NET, a master page that wraps every existing page (including my login page) and Ajax Control Toolkit for some controls. I am using JavaScript SDK functions as the Facebook Documentation dictates.
Here is the code to call Facebook API:

`<div id="fb-root">
</div>
<script type="text/javascript">
    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=APP_ID";
        fjs.parentNode.insertBefore(js, fjs);
    } (document, 'script', 'facebook-jssdk'));
</script>`

And here is the code that supplies users an entry point to Facebook Login with an anonymous JavaScript function:

<input type="button" 
    onclick=" FB.login(function(response) {
                           if (response.authResponse) {
                               console.log('Welcome!  Fetching your information.... ');
                               FB.api('/me', function(response) {
                                   console.log('Good to see you, ' + response.name + '.');
                                   FB.logout(function(response) {
                                       console.log('Logged out.');
                                   });
                               });
                           } 
                           else {
                               console.log('User cancelled login or did not fully authorize.');
                        }
              }, {scope: 'email'});" value="Login Facebook" />

The problem is that I get an exception saying that window.open is not a function but a property of the object and the Facebook Login dialog won’t appear (The exact exception message is as in the title). I don’t understand where this error comes from. I have been dealing with this problem for a day and now I have got desperate about solving it. Is there a way to find the source of problem? Can you please help?

Thanks in advance.

Note: The weird thing is that it works when I create a new page without using the Master Page and migrate all the Facebook calls to the new page.

  • 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-28T18:14:27+00:00Added an answer on May 28, 2026 at 6:14 pm

    Thanks to everyone who took a look at the question.
    Fortunately, I could spare some more time to solve the problem and I found where this error is reasoning from. It turns out that another developer declared a variable open = false; in one of the included JavaScript files without using the “var” keyword. Therefore, it overrode the existing “window.open” function and prevent it from functioning properly. All I had to do was changing the declaration to var open = false;.
    Neither I was experienced enough to notice it quickly nor JavaScript is that advanced to keep developers away from making such mistakes. So that led me to this mess 🙂

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

Sidebar

Related Questions

I'm trying to implement Facebook Connect on a website with .NET MVC using C#.
I am trying to implement facebook like functionality using android webview. It is working
I am trying to implement two pieces of functionality to my ASP.NET MVC 3
I am trying to implement Facebook Connect into my program. More specifically I am
I'm trying to implement a Facebook Like button for a website. I'm working in
I am trying to implement Facebook Login functionality to my website. I followed the
I've been trying to implement the Facebook SDK into my application in order to
i am trying to implement the facebook connect on my iphone App. after the
I'm trying to implement Facebook authentication into my web project. I've managed to get
I'm trying to build a page on my personal website that both used jQuery

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.