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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:10:57+00:00 2026-05-31T19:10:57+00:00

We are using Facebook JavaScript SDK to authenticate our Facebook application. The application is

  • 0

We are using Facebook JavaScript SDK to authenticate our Facebook application. The application is configured with the Canvas URL as http://facebook.elgifto.com/Home/Index/. Following is the code we are using to authenticate the Facebook user.

    <script type="text/javascript">
          window.fbAsyncInit = function() {
              debugger;
                  FB.init({
                      appId: '<%= ViewData["AppId"].ToString() %>', // App ID
                      channelUrl: '<%= ViewData["ChannelUrl"].ToString() %>', // Channel File
                      status: true, // check login status          
                      cookie: true, // enable cookies to allow the server to access the session
                      xfbml: true,  // parse XFBML
                      oauth: true
                  });

              FB.Event.subscribe('auth.login', function(response) {
                  if (response.status === 'connected') {
                      // the user is logged in and connected to 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;
                      startApp(uid, accessToken);
                  }

              });

          };

          // Load the SDK Asynchronously
          (function(d) {    
              var js, id = 'facebook-jssdk'; if (d.getElementById(id)) { return; }
              js = d.createElement('script'); js.id = id; js.async = true;
              js.src = "//connect.facebook.net/en_US/all.js";
              d.getElementsByTagName('head')[0].appendChild(js);
          } (document));




          function startApp(uid, accessToken) {                 
              var baseUrl = '<%= ViewData["AppBaseURL"].ToString() %>';
              var redirectUrl = baseUrl + '?uid=' + uid + '&accessToken=' + accessToken;
              window.top.location.href = redirectUrl;
              //document.location = redirectUrl;
          }          
       </script>
<fb:login-button onlogin="initiateLogin()" perms="email,user_about_me,user_birthday,friends_about_me,friends_birthday">Login with Facebook</fb:login-button>

The above code is not working in the Facebook when accessed as http://apps.facebook.com/giftguru. However we are able to access it through http://facebook.elgifto.com/Home/Index

  • 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-31T19:10:58+00:00Added an answer on May 31, 2026 at 7:10 pm

    The issue is related to pop-up blocking by browser. (the fact that is working for you outside of Facebook is probably because you’re allowed to do so sometimes before, for me it’s blocked as well as within application).

    You should never call FB.login without interaction from user (like element click or form submit) to ensure browser isn’t blocking log-in window.

    Update:
    You mixing many things here:

    1. Page on http://facebook.elgifto.com/Home/Index is using Application #316853928368079 (this app and have no namespace!)
    2. Your URL for OAuth Dialog have ' (apostrophe) around client_id which is wrong!
    3. OAuth Dialog isn’t working (probably also due to app settings, App Domain?)
    4. Application located on http://apps.facebook.com/giftguru is Application #83808922524 and have wrong Canvas URL! Proof:
      Facebook App Canvas wrapper
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Facebook Connect's Comments Box ( http://wiki.developers.facebook.com/index.php/Comments_Box ) to handle comments on my
I have a small doubt , I am using facebook javascript sdk to authenticate
I have created application in Facebook. By using Facebook Javascript SDk, I posted message
I am using facebook javascript sdk to retrieve logged in users info. I am
i have implemented facebook log in using Facebook javascript SDK in Jquery mobile ,
I'm using Facebook Javascript SDK. Using FB.Event.subscribe is unstable because sometimes it does not
I am using the Facebook Javascript SDK to create a login button using the
I am calling the Facebook Add Page Tab Dialog using the Javascript SDK as
I am pretty new to the Facebook API and am using the Javascript SDK
I use the javascript to get some data from facebook using javascript sdk: window.fbAsyncInit

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.