The Facebook Music application source code which ran since 2007 and became an open source project in 2011
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cron
css
flash
img
include
js
scripts
README.md
app.friends.php
app.help.php
app.index.php
app.link.php
app.paypal.php
app.upload.php
app.youtube.php
callback.fb.remove.php
callback.super-rewards.php
crossdomain.xml
fb.publish.php
fb.tabs.php
inc.add.php
inc.donations.php
inc.index-errors.php
inc.index-menu.php
inc.index-playlist.php
inc.index-stats.php
inc.playlist-callback.php
inc.playlist.php
inc.super-rewards.php
inc.youtube-callback.php
index.php
player-callback.php
player.php
playlist.php
tos.php
uploadprogress.php
xd_receiver.html

README.md

The Facebook Music App

http://apps.facebook.com/stevenlu

Notes

Because Facebook has removed FBML (deprecated), around 12/2011. The application was forced to be shutdown. Because of the huge profile changes, a lot of the application just became useless.

This was the second iteration of this application which was built in 2008. It received most of it's boom in 2007-2009. Afterwards, the Music App received very little attention and funding since after the new Facebook design in 2009.

I would like to state this is probably the worst piece of code I've ever written.

History

Around the summer of 2007, Facebook make it's third-party API available for use to the public. There was roughly about 60-80 or so applications that were released along with it which I assumed had private access to it. There was one called "Audio" which gave users the ability to take a link and create a player onto their Facebook profile. Its functionality was terrible and I decided I wanted to iterate my own. One where you can take your own files and upload it to your profile. Easy.

During this time I was already creating HTML/CSS websites and doing some pretty low-profile client work for the past couple of years. However, I never touched any dynamic programming since then. This is where I picked up PHP and MySQL on my own.

Now, it was pretty easy to pick up and I spent roughly about two weeks creating it. Got the basic functionality down and decided to ship it. However, it was probably the worst thing written since it was the first time I learned databases and PHP. Not only that, I was using a API that was probably very volatile.

Nevertheless, it worked. I submitted it to what Facebook called its "App Directory" and it made it! To date, it was one of the first 100 applications ever to be released into that directory amongst its millions of users. Now, people on Facebook were trying to find something new on the site then. So by behavior, they were just installing and using every application possible to just try out the site. This is what I call the "gold rush" period for applications.

Within about 24 hours or being accepted into the "App Directory", I had about 50,000 users! But, my shared hosting provider gave me a notice that they were going to shut down my application due to extremly high traffic load and disk usage. They suggested that I move to a VPS where I could be isolated but they didn't provide any help setting it up so I was on my own. I began to learn systems administration here, setting up my own LAMP stack through the command line.

During this growth, I also met Russell Frank who wanted to help me work on this venture. He helped me create a tool in C which converted any file into the proper mp3 format, the only format that Facebook's player allowed. He also helped me with some systems administration too. My gratitude for the help.

However, after another 48 hours on that VPS, the disk hit its limit (after scaling it several times) and then it was time to move to a dedicated server. Got the box, set it up, and things were working again.

Within the first month, the application was scaling at about 1,500 users per hour and I roughtly hit a million users by this point. I was spending on my own about $200 just to keep it running. Money that I didn't have as a high school student. It was time to figure out how I was going to make money by this point.

By this time, school had started and my friend Russ fell off the grid, so I was on my own. At the same time, I had a company called Invite Media help me pay for my infrastucture to allow them to read user ifnormation off my application. Something to keep the books even.

Three months later, there were a bunch of new advertsing platforms that spawned and were directed as social media targeted avertising. A representative gave me a call and I decided to start working with them. Since it was all new, the CPC was very high and companies were willing to pay largely for it and that's when I hit my "gold rush".

It didn't last very long. In February 2008, I received a nice letter from the RIAA to tell me to shut it down. If you want a copy of the letter, you can always ask me for a copy. Here's where I had to shut the application down and shred all the data on the drives.

It wasn't until late 2008 until I started re-writing it again. This time, it was much more secure and slightly redesigned. Surprisingly, people kept using the application and I was still making a profit out of it. I added several features in thie iteration too which enticed others to use my application.

During the process though, the Facebook API was so volatile that it broke my application dozens of times. And soon, Facebook changed its design which killed the use case of the application. So finally in December of 2011, it began running in the red again (money wise) and it was time to shut it down.