Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC3 and Facebook integration

Tags:

I'm just about to start a new ASP.NET project using MVC3, and since some of the requirements are about facebook integration, I need your advice on the following issues:

1- Is it achievable to connect my Membership users to thier Facebook accounts so whenever a user share/add/comment on an event on my website, I can automatically share these actions using his/her Facebook account?

2- also the ability to create Facebook events when the user create one on my site, and if he/she updates the event information, I may update them on Facebook too.

3- Can this be achieved using Facebook Connect, or this is only to authenticate users using their Facebook accounts?

4- How about using Graph API from my MVC solution, I know that there is a Facebook C# SDK on Codeplex http://facebooksdk.codeplex.com, but will it satisfy my mentioned needs or not.

Thanks in advance.

like image 500
Mohammed Swillam Avatar asked Mar 23 '11 22:03

Mohammed Swillam


People also ask

How to create Facebook app using MVC 4 in Visual Studio 2012?

In this article, we will use the MVC 4 template in Visual Studio 2012 to create a Facebook App. The app is created at the end of this article will look something like this: Now let's start creating the App. Run your Visual Studio 2012. Select "File" -> "New" -> "Project...".

How to create a MVC 4 web application using MVC?

Select "File" -> "New" -> "Project...". Now under the Templates first expand the C# node then the Web node then select "ASP.NET MVC 4 Web Application". Now provide the name for this project and then click on the "OK" button.

How do I set up a Facebook login for my website?

Click Settings > Basic link in the left navigation. On this page, make a note of your App ID and your App Secret. You will add both into your ASP.NET Core application in the next section: When deploying the site you need to revisit the Facebook Login setup page and register a new public URI.

How do I create an app on Facebook?

From the My Apps menu select Create App. The Create an app form appears. Select an app type that best fits your project. For this project, select Consumer, and then Next. A new App ID is created. Fill out the form and tap the Create App button. On the Add Products to Your App page, select Set Up on the Facebook Login card.


1 Answers

I've done something similar recently. Based on my experience:

  1. Yes, you can connect your membership with a Facebook account, however it does not guarantee your user activity will be pushed to Facebook. (users have to log in with Facebook authentication)

  2. Same as above. This blog post does a good job of describing it: http://amirrajan.net/Blog/asp-mvc-and-facebook-single-sign-on

  3. No, facebook connect only takes care of authentication. For more information, check: http://thinkdiff.net/facebook/graph-api-javascript-base-facebook-connect-tutorial/

  4. I have not tried the Facebook SDK you mentioned. However, I believe facebook Graph API already does a good job for you to and will fulfil your requirement

like image 163
D.J Avatar answered Oct 02 '22 15:10

D.J