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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:59:06+00:00 2026-05-21T15:59:06+00:00

I am looking at using the facebook SDK and I am wondering first what

  • 0

I am looking at using the facebook SDK and I am wondering first what version should I be using?

It looks like some major changes are happened from 4.2 to 5(currently still in beta). Should I go ahead and use the beta? Anyone have any ides when it will be out of beta?

My second question is how can I use it for authentication.

Right now I am using DotNetOpenAuth to do all my openId authentication for my site. I am using there sort of plugin for facebook authentication(oAuth) however I am planning to use more facebook features on my site so I think it is kinda pointless to use this plugin and then the sdk libary when the library seems to be able to do it all.

Anways how do I do authentication with the sdk library. I want to have a button on my login page that they click it goes off to facebook they become authenticated and I get some request back saying that they where authenticated and then I give them a cookie and let them in.

All the tutorials I seen to have it that your just using facebook as your only authentication method but of course for me I have openId, facebook and twitter.

http://facebooksdk.codeplex.com/wikipage?title=Getting%20Started%20with%20an%20ASP.NET%20MVC%203%20Website&referringTitle=Getting%20Started

  • 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-21T15:59:06+00:00Added an answer on May 21, 2026 at 3:59 pm

    Regarding 4.2 vs 5.0 BETA I guess you need to decide whether you want to use a BETA version or a stable version. I am sure they have a changelog in their BETA Release you can look at for the changes since the older version.

    Regarding authentication using Facebook. I have a project where I support standard Forms authentication and accounts creation as well as Facebook login. In my AccountController I have one action for Forms login and one for Facebook login.

    To configure the Facebook assembly you can follow the tutorial you have posted, then you can put a Facebook button on your page and similar code to begin the authentication process:

    <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
    <script type="text/javascript">
        $(function () {
            FB.init({ appId: '<%= FacebookSettings.Current.AppId %>', status: true, cookie: true, xfbml: true });
    
            $('#fbLoginButton').click(function () {
                FB.login(function (response) {
                    if (response.session) {
                        // Success - execute our facebook login action.
                        window.location = "<%= Url.Action("FacebookLogin", "Account") %>";
                    } else {
                        // user cancelled login or failed
                    }
                }, { perms: 'email' });
    
                return false;
            });
        });
    

    The facebook aciton works by:

    1. Was Facebook Authentication successful?
    2. Do we have a user with the Facebook Id as a username in the system?
    3. If not create a user, populate name, email, etc from the Facebook data
    4. Set the Forms authentication cookie

    Pseudo code:

    FacebookApp facebook = new FacebookApp ();
    if (facebook.IsAuthenticated) {
            string userName = facebook.UserId.ToString();
    
            if (UsersRepository.ByUserName(userName ) == null) {
                // Create a User using the Facebook name, email, etc data
            }            
            FormsAuthentication.SetAuthCookie (userName , true);
    }
    

    So the idea is that I delegate the authentication to those 3rd party services and then create a user on my system with the information I can fetch from them. Also in my project, because I want the user to set/very some preferences after the account is created I redirect them to the page where they can do that.

    P.S: A tip regarding running your web project locally in Visual Studio. You can create a private Facebook App with “Site URL” set to e.g. “http://localhost:4911/” and use that appId. This will allow you to play with Facebook locally.

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

Sidebar

Related Questions

I was looking into using some .NET code from within a Delphi program, I
Looking for some code to upload a photo to facebook using the Graph API
In my Android app, I log in using the Facebook SDK and display posts
I'm using v3 of both the JS SDK and PHP SDK for Facebook Connect.
I am using the Facebook Javascript SDK to create a login button using the
I am developing a facebook app using php SDK, my app is small and
I have been looking into using Facebook Connect for a new web site I
I'm working on a multiplatform game (PC/iOS/Android) and was looking into using Facebook as
I've been looking at the Facebook API to find some way to edit a
I created an asp.net mvc 3 facebook application using facebook c# sdk. I'm trying

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.