Introduction
Visual Studio 2013 Preview provides the following types of web project templates that target the .NET Framework 4.5 or later versions:
- Empty template
- Web Forms template
- MVC template
- Web API template
- SPA template
- Facebook template
- Mobile template
- Visual Studio 2013 Preview
- ASP.NET and Web Tools
When you want to host your application, the host needs to follow the following important steps.
Project Creation
- Open your Visual Studio 2013 Preview.
- In the New Project, choose "Web" and then select "ASP.NET Web Application".
- Select your .NET Framework.
- Enter your application name, choose location (optional) and click "OK".
- Select "Facebook Template". There is no authentication required for creating this template.
- Select your application in the Solution Explorer.
- Open the Properties Window.
- By default your SSL Enable is false, change it to true.
- Copy your SSL URL.
- Right-click on your app in Solution Explorer and click Properties.
- Select the "Web" Tab.
- In the Project URL option, paste your SSL URL and click "Create Virtual Directory".
The Facebook Template helps you to provide boilerplate code with which you connect your application to Facebook and fetch properties, like photos and email. All you need to do is some settings in your Facebook.
- Open your browser and go tohttp://developers.facebook.com/apps and enter your login credentials in Facebook.
- Register yourself as a developer and follow the directives.
- Click "Create New App".
- Enter
your unique APP Name and APP Namespace credentials. Select your unique
APP Namespace that will be used to access your Facebook app. You can
also leave App Namespace because it is optional.
- Note your App ID and your App Secret. Ensure that your Sandbox Mode is Enabled.
- Open the Web.config file in Visual Studio 2013 Preview.
- Paste the App Id, App Secret and App Namespace values into the corresponding elements.
- Right-click on your project and go to properties. From the "Web" tab copy your Project URL.
- Paste
your Project URL in the Canvas URL and Secure Canvas URL. Change the
Canvas Width to "Fluid" for changing your app width depending on the
user's web browser size.
- Click on "Save Changes".
- Run your application from Visual Studio 2013 Preview.
- If
your browser displays some type of error then ignore it and login to
Facebook and Facebook want to authenticate the app before running.
- Allow your app and it will run your app. You now have a simple Facebook application.
No comments:
Post a Comment