Geeks With Blogs

News

Tiago Salgado .NET / SQL Server / IT / etc...
One of the new features on Visual Studio 2012, is the ability to integrate a social login (Facebook, Twitter, etc) in our web applications. 
In this example, we can see how easy is to add Facebook login to our project. 
First, we need to create an App in Facebook Developers page. To do that, go to http://developers.facebook.com/apps and create a new one. 
After creating the app, we have something like this:
   
Now, go to VS2012, create a new project (i choose ASP.NET MVC 4 Web Application). Then, in Solution Explorer, you'll find a class in App_Start folder called AuthConfig.cs. 
Open it, and uncomment the following code:
 
OAuthWebSecurity.RegisterFacebookClient( 
 appId: "", 
 appSecret: ""
); 
 
 
Here, you need to add your appId and appSecret returned when you create the App on Facebook. And thats it. Try yourself and see how easy it is. This method is the same for ASP.NET Webforms, MVC. To WebPages, you need to uncommend the code in _AppStart.cshtml.
Posted on Friday, August 17, 2012 5:15 PM | Back to top


Comments on this post: Facebook login in ASP.NET web application with Visual Studio 2012

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
But users can login through Social Login by other providers like gmail, yahoo, hotmail , etc. So, I think, it's better to use Social Login one like developed by LoginRadius, http://www.loginradius.com. They also provide Social Sharing, Social Analytics. It’s also good plugin for Social Login.
Left by Michael on Aug 20, 2012 1:21 PM

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
I was struggling with this script for a long time. Finally I got it done following this steps. Great sharing. Thanks!
office catering sydney
Left by healthy home delivery Sydney on Aug 25, 2012 12:15 PM

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
Hi we're using 2012 and .net 4.5 and just started using oauth

I was just wondering with the Roles table that is created is there any way to get the roles hooked up using the asp.net configuration tool or do you have to manually write an admin page to add roles and add users to roles?

Cheers,
Tom
Left by Tom on Aug 29, 2012 3:56 AM

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
hey can I create whole facebook apps using Visual Studio 2012 on asp.net// ..??
Have you ever ecpereinced../?
Left by Umer Qaisar on Feb 11, 2013 4:46 PM

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
Thanks,

But I wonder How do I write an app on fb platform using VS??
Left by JeyKeu on Apr 07, 2013 2:21 PM

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
Creating facebook login by using asp is easy, above post
is useful for new Developer.

Recent post on Outsource .NET Development
Left by xicom-Outsource .NET Development on Jun 27, 2013 11:26 AM

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
check this
www.androdevelopment.com/
Left by noname on Oct 14, 2016 12:54 PM

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
Likewise facebook we have a tool which let get all the people insta followers for free and it is real instagram followers,So it is great to have such kind of things.
Left by Sameer on Jul 29, 2017 11:19 AM

# re: Facebook login in ASP.NET web application with Visual Studio 2012
Requesting Gravatar...
if you want change your fb profile name in stylish font like fancy text.... than you can try these Aalll stylish name list for facebook i hope you will like these all names
Left by Ankur on Oct 14, 2017 10:23 AM

Your comment:
 (will show your gravatar)


Copyright © Tiago Salgado | Powered by: GeeksWithBlogs.net