ProgrammerGuide.Net | Step by Step Programmer Guide

Create NewApp in Facebook and Connect the App to ASP.NET MVC Project – ASP.NET MVC | ProgrammerGuide.Net | Step by Step Guide

Facebook ASP.NET MVC Template provides boilerplate code to connect your application to Facebook and retrieve Facebook properties such as Likes, photos, email and friends profile details. However, in order to get your application connect and interact with Facebook, we need to configure some settings from an application that you created in Facebook copy to your ASP.NET MVC project.

  1. In your browser, navigate to https://developers.facebook.com/apps and log in by entering your Facebook credentials.
  2. If you aren’t already registered as a Facebook developer, click Register as a Developer and follow the directions to register.
  3. Click Create New App.(Figure 1)
  4. Enter an App Name and App Namespace, and then click Continue.(Figure 2)
  5. On the Basic Settings page for the app, set the Sandbox Mode to Enabled. This ensures that you have exclusive access to the app until it’s ready to be made available to everyone.(Figure 3)
  6. In Visual Studio, open the application Web.config file that is located in the root folder of your project.
  7. Copy and paste the AppId, App Secret, and App Namespace values into the corresponding key elements in the appSettings collection in the Web.config file.(Figure 4)
  8. In Solution Explorer, right-click the project and click Properties, and then click the Web tab.
  9. Copy the Project URL from the Web tab and paste it into the Canvas URL field in the Facebook Basic Settings page.(Figure 5)
  10. Change Canvas Width to Fluid.
  11. Click Save Changes.(Figure 6)
  12. Press CTRL+F5 to run the application.

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Please click here for related products on Amazon!

Jayashee

Add comment

Want to Check Celebrities News?