This is a mirror of official site: http://jasper-net.blogspot.com/

Developing facebook connect application using asp.net

| Wednesday, April 28, 2010
Introduction

Facebook became center of attraction for developers in recent days, because of its versatility and wide range of support.I always wanted to work with facebook api to explore its features.Few months back I worked in a project that requires facebook integration, working with facebook users friends data and so on. So I started to digg in to the facebook api. There are so many cool things can be done by the api provided.In this article I have tried to summarize step by step approach for developing a facebook connect application.

Developing application for facebook

Application development for facebook platform comes up with 2 choices, one is canvas and another is connect. If you create a Facebook application, one of the most confusing parts of setting it up is choosing whether to make your app use IFrames or FBML.IFrame canvas pages are pretty straightforward. When the user loads a page on Facebook like http://apps.facebook.com/APP_NAME/somepage Facebook provides a webpage that has a big Iframe, application loaded inside the provided IFRAME. FBML canvas pages are a little bit different. When the user requests a page like http://apps.facebook.com/APP_NAME/somepage Facebook server will send a request to your app’s server where application is hosted. This will be an HTTP POST to some URL like http://www.yourserver.com/callbackurl/canvaspage. IFRAME based canvas application is not in the scope of this article, so we stick to FBML connect application.

Connect application basics

Facebook Connect is a powerful set of APIs for developers.API deals with the user's interaction with the Facebook account and provides a way so that application can access the user's profile information and friends list, write on the wall, and email the user if user allowed so. Developing a Facebook Connect application involves adding a few XFBML tags to an HTML page. Facebook Connect uses a cross-domain communication channel to open an iframe on the HTML page for each XFBML tag. When the user clicks a tag, Facebook Connect handles the interaction and lets the user log in, access friends data, user data, and so on.
A Facebook Connect application can use any or all of the following:

   * XFBML tags(XFBML is a way to incorporate FBML into an HTML page)
   * JavaScript, with calls to the JavaScript client library
   * Code in any language, with calls to the Facebook REST API (in my case i used asp.net with facebook toolkit for .NET for calling REST)

Read more: Codeproject

Posted via email from jasper22's posterous

0 comments: