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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:50:53+00:00 2026-05-27T08:50:53+00:00

On the front-end, I’ve initialised FB and login using: window.fbAsyncInit = function () {

  • 0

On the front-end, I’ve initialised FB and login using:

  window.fbAsyncInit = function () {
        FB.init({
            appId: @facebookAppId, // App ID
            status: true, // check login status
            cookie: true, // enable cookies to allow the server to access the session
            xfbml: true,  // parse XFBML
            oauth: true
        });

        // Additional initialization code here
        FB.Event.subscribe('auth.login', function () {
            window.location = "/facebookPostAuth.aspx";
        });

        FB.Event.subscribe('auth.logout', function (response) {
            window.location = '/logout';
        });

        // Hack to fix http://bugs.developers.facebook.net/show_bug.cgi?id=20168 for IE7/8/9
        FB.UIServer.setLoadedNode = function (a, b) { FB.UIServer._loadedNodes[a.id] = b; };

    };

    // 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));

On the back-end, how do I check if there is a login session existing using Facebook C# SDK?

This is as much as I’ve got, but I’m not sure how to pass in the APP ID / Secret to get more information (such as email which I’ve inluded in login scope):

 var client = new FacebookClient();
            dynamic me = client.Get("me");
            string firstName = me.first_name;
            string lastName = me.last_name;
            string email = me.email;
  • 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-27T08:50:53+00:00Added an answer on May 27, 2026 at 8:50 am
    var client = new FacebookClient(appID, appSecret);
    

    or

    var client = new FacebookClient(accessToken);
    

    You can grab the access token client-side with the javascript SDK and pass it up to the server in a hidden form field (conventional or ajax), or the C# SDK exposes what it finds in the cookie and/or signed request via FacebookWebContext.Current.AccessToken. In the past I have found some timing issues where Facebook did not update the cookie with a new access token/signed request in a timely fashion, which is why I get it in Javascript and post it to the server.

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

Sidebar

Related Questions

I am writing front end app that connects to a DB and downloads any
I have the following front end code: <ajaxToolkit:TabContainer runat=server Height=150px Width=70% ActiveTabIndex=1 OnDemand=true AutoPostBack=false
I have a front-end Access 2007 database connecting to MySql tables using MySQL ODBC
I'm a front-end web developer at a company using Java on their server. As
Flex front-end using AMF to Java back. Trying to read, in real-time, a file
I'm a front end developer who's recently started using IntelliJ Idea for JS development.
I'm building a front-end content editing module for my own framework using a WYSIWYG
I'm developing a WPF front end (using MVVM and Prism) for an existing MFC
I am writing a front end for a server application using the curses module.
This is my front-end code (using fetch ) var MyModel = Backbone.Model.extend(); var MyCollection

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.