I know...I know...in the world of social networking like twitter, blogs just aren't cool anymore, right? Well every once and a while I want to share something that exceeds 144 characters, so I created SolamenteNiel, my blog. While I'm at it, I'm also going old school with a cheesy picture of myself on my blog. In this picture I'm pertending to be an IndyCar driver.
Last year I did a series of posts related to developing a Spring-based Facebook applications using Skyway Builder. I also made the project (developed w/ Skyway Builder 6.0) available for download. With the availability of Skyway Builder 6.1, I thought it made sense to provide an updated version of the project, particularly since there have been many recent downloads of the original project.
For reference, here are the links to the original posts:
There are a few changes to the new project, but nothing major. I don't plan on updating the original posts, but I will outline some of the changes (from memory):
I'm almost done with my series of posts on developing a Spring-based Facebook application using Skyway Builder. I have one more post to go, but I'm already thinking about what's next. This Open Social things is similar to Facebook application development. Maybe I'll check it out next.
Reprinted from my Skyway Community Tech Blog posting:
In Facebook Authentication - Overview (Post #5) I gave an overview of Facebook authentication. In this post I’m going to show exactly how to implement this using Skyway Builder CE, and I will be augmenting the project that I started to create in Facebook application using Spring Framework (Post #4). At the end of this post there’s a link to download this Eclipse Project for Skyway Builder CE.
Read Full PostReprinted from my Skyway Community Tech Blog posting:
I indicated in post #4 that we would build a simple application that lists the birthday’s of your Facebook friend’s. When you are logged into Facebook as a Facebook user, you have access to information you’re friends have published about themselves, and you would access this data by navigating to their profiles.
A Facebook application can also access this information using the Facebook API. However a Facebook application doesn’t have unrestricted access to the data. A Facebook application only has access to data that has been granted to it on behalf of the end-user of the application. When you add a Facebook application, you will be prompted to grant the application access to your data, and the Facebook application can only access data related to you.
A Facebook application doesn’t automatically know who you are. Nor does Facebook for that matter. Hence the need for authentication, a way for an application to identify who you are. Fortunately Facebook does all the hard work. A Facebook application doesn’t need to implement it’s own authentication logic. Hurray!! However a Facebook application does need to know how to integrate with Facebook’s authentication system. Boo!!
It’s not really too bad. The first time you do it, it can be a bit confusing. However I will share with you what I learned and a sample Skyway implementation that you can re-use.
Building on my previous posts (see post #1, post #2, post #3, and post #4), here’s an overview of the authentication process from the moment someone tries to access your Facebook application.
This whole sequence of steps is done to get the user’s session key. While it looks a bit crazy, the end-user isn’t aware of all this craziness. All the end-user knows is that they type in a URL (step #1) and get a Facebook page (step #8) with your Facebook application in the page (step #11). Now that you have end-user’s session key, you can access the user’s Facebook data….including their friends. We’re one step closer.
In the next post I will show you how to implement this in a Skyway Builder project.
This post is one of a series of posts relating to developing Spring-based Facebook applications using Skyway Builder:
Reprinted from my Skyway Community Tech Blog posting:
Okay….I think I’ve covered enough introductory content (see post #1, post #2 and post #3). Now it’s time to get down to some code.
I’m going to implement the sample Facebook application using Java. More specifically, the application is going to utilize the Spring Framework and Spring MVC. By leveraging Spring I can deploy the Facebook application to a variety of JEE configurations. I can deploy it to a JEE-lite environment that consists of Apache Tomcat, or I can deploy it to a full JEE application server utilizing both a web container and EJB3 container. For the sample Facebook application, I’m going to produce a JEE web application (war) for Tomcat. I’m not going to persist any data, so there won’t be a need for a database.
While the application is built on top of several Spring frameworks, I’m not going to really dig into Spring development. I’m going to use Skyway Builder CE, a domain-specific language (DSL) for generating Spring-based applications. Skyway Builder CE is open-source and runs inside of Eclipse. Skyway Builder will generate the Spring beans and wire them up into a Spring application.
Download Skyway Builder CE from here. I recommend downloading the RCP version of Skyway Builder. You will also need a sandbox, a runtime environment for testing the applications Skyway Builder generates. There is a sandbox setup guide that will guide you in setting up Tomcat and MySQL. However since I’m not using a database for this example, you can skip the database setup section of the guide.
Once you have Skyway Builder running and your sandbox ready to go, the following steps are for creating the most minimal application that will be integrated into Facebook. Let me warn you that this application won’t do much yet. At this point we’re only concerned with integrating something (anything!!!) with Facebook. In the next post we’ll cover building out some logic for accessing Facebook data.
We’re done with development. Now let’s deploy the application.
We’re done deploying. There is now a war file located in Tomcat, and the application is initialized and ready to run. Now let’s run the application.
We’re done. Now let’s integrate the application into Facebook.
Your Facebook should now be accessible from your Facebook application’s Canvas Page URL (i.e. http://apps.facebook.com/nielfacebookapp/). Copy the URL into your browser, and you should see the Facebook page, and your application embedded in the page.
Tada!! You have completed your Facebook application. So now what? Well…you probably want to do something just a bit more interesting. For example, let’s say that you want to list all of your Facebook friends birthdays. That’s what I’ll do over in the next few posts. I’ll cover Facebook authentication and the Facebook API.
This post is one of a series of posts relating to developing Spring-based Facebook applications using Skyway Builder: