Archive for the ‘Facebook’ Category

Flash Facebook Cookbook Review

December 5, 2011 Leave a comment

Facebook is great social web. Millions of active users and new users connect on Facebook platform through devices, applications and websites (refer the Statistics). As we know there is huge demand for content on the platform, the requirement for the platform developer also grown. So I thing learning material, perfect development approach guidelines or tips related to the platforms applications are most important.

Flash Facebook Cookbook by James Ford, is one more information source for Facebook Developers. I received a copy of this book and while reading it, I would like share review of the book.

The Flash Facebook Cookbook contains integrating Flash applications with Graph API and Facebook platform. It contains lots of recipes for that and recipes start with basic explanation of Flash-Facebook integration. If you have some knowledge of Flash Builder, Flex framework or Flash platform then it’s a nice book to explore your experience with world by Facebook platform.

Enjoy RIA 🙂


Isometric 3D Games

February 25, 2011 1 comment

I would like to share some basics of setting for isometric 3D for some interesting application using open-source as3isolib library.

There are several popular 3D games like Farmville on facebook. There is a great open-source library known as as3isolib to develop such superb games. The open-source library, includes utilities, primitives and views and was developed with simplicity, speed and performance in mind so that developers can focus on actual implementations rather than having to learn a complex API.

The as3isolibs actionscript library provides a nice framework on which use, to build some interesting isometric games and applications. To get started with as3isolibs first download the latest version of the library from here, and add it to the Flex Builder path.

As the library relies on the Flash player 10 features so there are some instructions here to target Flash Player 10.

To use as3isolib will have to understand how to render isometric primitive to the display list, IsoGrid , IsoBox, IsoScene, IsoView and many more.

IsoPrimitive is the base class for primitive-type classes that will make great use of Flash’s drawing API. Developers should not directly instantiate this class but rather extend it or one of the other primitive-type subclasses.

IsoGrid provides a display grid in the X-Y plane.

IsoBox, 3D box primitive in isometric space.

IsoScene is a base class for grouping and rendering IsoDisplayObject children according to their isometric position-based depth.

You can get more information from the API Documentation.

You will get more superb information from below video tutorial from Lee Brimelow video tutorial Introduction to Isometric 3D.

Hope this information will be helpful to start work on isometric 3D.

Enjoy RIA.. 🙂

Adobe Flash and Facebook

October 5, 2010 7 comments

As we know that Adobe Flash and Facebook provide superb solution for building rich and social experiences on the web. And there is some useful informations for developers to build applications using the two great platform.

You can refer the article for Facebook application development using Flash Builder from here.

I think there is no need to say about number of people everyday to connect with Facebook and share there views and ideas with world !! Adobe Flash and Facebook together allow some interesting things like share your ideas with friends, have some fun with superb games etc.

You will get the Adobe ActionScript 3 SDK for Facebook Platform from here.

For more references of Flash and Facebook application development you can download sample code from the list as described below:

– Display information on currently logged-in user – Download Sample Code
– Display list of photo albums – Download Sample Code
– Browse thumbnails of Facebook photos – Download Sample Code
– Display list of events – Download Sample Code
– FQL Query – Download Sample Code
– GraphAPI – Download Sample Code
– Up2 – Download Sample Code
– Friends List With Flash – Download Sample Code
– Friends List With Flex – Download Sample Code
– Media Upload Demo with AIR – Download Sample Code
– Media Upload Demo with Web – Download Sample Code
– News feeds Demo with AIR – Download Sample Code
– Web IFrame Demo – Download Sample Code

Enjoy RIA.. 🙂

Flash Builder and Facebook Communication

May 10, 2010 2 comments

The Flex application you are going to build will display a logged in Facebook user information let’s say name, photo, and the users friends name list,  and will use Flash Builder to create user interface to communicate with Facebook.

As these articles is second part of the if you would like then you can get first part information from here.

Create a Flex project in Flash Builder.

1)   In Flash Builder create a new project and give project name. Here I am using “FacebookDetails” as project name.

2) Now, select Finish option and go to Design mode and from Components panel, drag out a Lable and put it on Design area. Now set the its id as loginLbl and set text property WelCome in the Properties View.

Let’s drag out a Button and put in on Design area and set its id to loginBtn and label to Login. Now if you run the application then it’s looks as below.

For our application will have to create two states, a login state which show a Label and login Button, and a logout state which display a Label, a logout Button and a DataGrid components. Lets switch to Design mode.

2) In State view first rename the State 1 to login, and click the New State button and enter state name as logout and choose OK.

In the logout states as we described above we needs a Label, logout Button and DataGrid to show users friends name list. So the logout states look like

Click the source button. Your code should look like as shown below:

Now we move towards main part of our application. To communicate with Facebook we need to use ActionScript 3 Library for Facebook Platform. So first you have to download the classes and use the classes for the application.

1) You can get the ActionScript 3 Client Library for Facebook Platform from here.

Download it and put the SWC file in libs folder of the application.

Create Facebook session


To start communication with Facebook,  we will have to create a session that authorizes the application with Facebook for specific user.

2) First add Script block where we define application variables and functions. Define some variables as below and it will import related classes.

3) Now lets move towards functionality of the application. Add click property of loginBtn and select  Generate Click Handler from the Code Assist pop-up.  And create instances of FacebookSessionUtil, Facebook, also register event listeners and call the session login method as shown below.

You have to specify you API_KEY and SECRET  keys as it, you can retrieve your application API key and application secret from the Facebook Developer application      (in Facebook click the Developer application link, and then click the link My Applications, then click on your application ).

I would like share one thing here this is an sample application so we can pass the API Key and SECRET keys hard code or we can retrieve it dynamically but the SWF can decompiled and any one can access your application data. So I think it would be good idea if these key will retrieve using Flash Remoting or web service call from your application or use Facebook Connect to login.

If you run the application and click login button then it will open Facebook login page in another browser window.

You will have to login by your Facebook  id.  Then it will redirect you to the page shown below.

During the Facebook login process user will have to wait for some time and the process delay will be handling by FacebookEvent.WAITING_FOR_LOGIN handler, as shown below.

And the alert CLOSE event will just  validate Facebook login as below.

After successful connection with Facebook the FacebookEvent.CONNECT will managed by onFacebookConnect() method as described below. Now we are connected with Facebook so we call Facebook methods using post() to get required data from Server. In the API there is one command class for each of the corresponding calls in the Facebook. Like to get more information about the user, use the GetInfo() command with appropriate arguments. And the call will managed by FacebookEvent.COMPLETE.

Also we want to get the user’s friends list so will also have to call GetFriends() commands, you can observe it in above code. And you will get friends id and based on that id will have to get other details by GetInfo() call.

protected function onGetFriendsList(event:FacebookEvent):void { var _friendsUid:Array = new Array(); var users:FacebookUserCollection = ( as GetFriendsData).friends; for(var i:int; i < users.length; i++){ _friendsUid.push((users.getItemAt(i) as FacebookUser).uid); } var friendsDetailsCall:FacebookCall = GetInfo(_friendsUid,[GetInfoFieldValues.ALL_VALUES])); friendsDetailsCall.addEventListener(FacebookEvent.COMPLETE, onFriendsGetInfo); }

And the friends details we get the names and by push those names in DataGrid component as described below.

Finally, you will get the result of application as

At last you can handle the session logout by logout() method as described below

I hope you would like the sample application article.  I would like to get your suggestion regarding this articles and technical improvements.

Enjoy RIA…  🙂


Flash Builder Facebook Application Development

May 8, 2010 11 comments

Adobe Flex and Flash Platform provides excellent development environment for rich experiences for games and websites. To develop an effective user experience application I think need to plan from scratch means the selection of development tool to deployment environment.

Recently, I am got some time on exploring interesting application on Facebook and exploring frameworks and Flash Builder.  Among a list of available options for frameworks and Facebook applications, I choose to explore an option for creating Flash Builder web application with Facebook.

To develop Facebook application will have to use Facebook REST API we will have to follow some steps as described below:

1) Add Facebook Developer application to your Facebook account
2) Get application API key to communicate with Facebook server
3) Register a Facebook application
4) Create an Flex application with Flash Builder

To communicate with Facebook from your application, first register your application with Facebook using Facebook Developer application.

1) In browser go to Facebook and login
2) Go to Facebook Developer application
3) Choose Allow option in Allow Access dialog box

4) Click the Bookmark Developer App link at the top of the browser window

5)  Click the Home link at the top of the page

6) On the Home page, see the new Developer application bookmark

Register application with Facebook

To communicate with Facebook from your application, you must first register your application with Facebook using the Developer application which assigns an application API key and secret which are used when you make calls to Facebook.

1) Return to the Facebook Developer application by clicking the application’s bookmark

2) Click on Setup new application

3) Enter your application name and fill some details and choose Create Application option.

4) In Basic section you get Application ID, API Key and Secret Key related to your application.

See, these Application Secret Key and API Key will be used for your Flex application. These Key is will create a connection between your application and Facebook.

5) Now select the Advanced option from the left side navigation.  For applications which can communicate with Facebook, you have to choose Application Type options. For web application will have to use Facebook REST API and specify setup and will have to use Facebook connect login for login functionality and it will have to deploy your application files on a publicly available server.

Now choose Save Changes option and you completed first step for you application.

Friends, very soon will post next step for these application, which will receive User Facebook  details in Flash Builder application.

Adobe Social Service To Develop Social Applications

October 31, 2009 Leave a comment

Adobe had released a service to use a single set of APIs to integrate your application with social networks including Facebook and MySpace. Developers can easily develop social applications by using the APIs and also these services are insulates developers against underlying social network changes, the service adopts to those changes so as a developers you need not have to take tension to update your application. 🙂

Developers can get information, to use the new API to develop social network application, from here.

You can download the Social Service Library from here.

And as usual environment provided by Adobe to share the social application development problem at here.

Enjoy RIA… 🙂

Flash Flex content into social network of Facebook

October 4, 2009 Leave a comment

We can observer the one thing that Facebook is one of the most popular and most funny social networking site today. Adobe and Facebook both are developing their products in such a way that they can communicate easily.

There are several tutorials and several guidelines are available for the Flash/Flex application integration with Facebook and how both the platform can communicate.

You can refer following links to develop such environment for your Flash Flex applications
1) Adobe Flash & Facebook
2) Deliver rich, social experiences on the web
3) Facebook Developer Guide
4) Case Study

Enjoy RIA …. 🙂