O'Reilly logo

Professional Silverlight® 4 by Bill Evjen, Jason Beres, Devin Rader

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C. Building Facebook Applications with Silverlight

You can create an application that accesses the Facebook API in several ways. If you do a quick search on Bing you'll see a variety of open source projects and Visual Studio project templates that will help you access Facebook information and display it, or add your own games or social media experiences to Facebook. This appendix looks at using the Facebook API to interact with your own Facebook data in a unique Silverlight user interface hosted in an ASP.NET web application.

CREATING A NEW APPLICATION ON FACEBOOK

To access your Facebook data, you need an API Key and Secret value. To generate these, you need to create a Facebook application:

  1. Sign up for a Facebook account at www.facebook.com.

  2. Enable Developer access by navigating to http://www.Facebook.com/developers/ (see Figure C-1) and clicking the Allow button. The Developer page displays.

  3. On the Developer page (see Figure C-2), click the Set Up New Application button. The Create Application page displays.

  4. As shown in Figure C-3, type the name of your new Facebook application (SilverlightDemo in our example) and agree to the Terms of Service. Then click Create Application.

  5. On the Edit Silverlight page that displays (see Figure C-4), make sure you make a note of the API Key and the Secret values for your application. You'll need to input the values for the API Key and Secret into your Web.config in your ASP.NET website later, so copy them to Notepad for later use.

  6. Click the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required