How Facebook Hacked The NASDAQ Button

Editor’s note: Some savvy Facebook engineers rigged the NASDAQ button to automatically post “Mark Zuckerberg has listed a company on NASDAQ – FB” to the CEO’s Timeline as he rung the bell to open the NASDAQ’s day of trading. David Garcia, a senior software engineer at Facebook, explains how they turned the NASDAQ on to Open Graph.

It was a normal Monday. Nothing out of the ordinary other than that Facebook was set to go public at the end of the week. Camera crews were beginning to appear and NASDAQ was coming to campus so we could ring the opening bell together. Other than that, it was like any other Monday.

During lunch, some us started talking about how cool it would be if the second Mark rang the bell a story would post to his timeline to let his friends and subscribers know.

I was so excited about this idea that when I got back to my desk, I posted on Facebook: “We should totally hack the button so it pushes an open graph action, “Mark Rang the NASDAQ bell”.

The first person to comment? Zuck: “It would be epic if you pulled that off.”

I got to work that night.

The solution: connect the NASDAQ button to a mobile phone logged into Facebook to generate an open graph action. While this seemed simple, it would prove to be a little more complex in practice.

Step one was to hack the headphones of my mobile phone. Just like you use headphones to play or pause music, I wanted to get them to publish an action on Facebook. I grabbed a soldering iron and soon enough we had a way to trigger the phone to publish an open graph action.

Step two was to see how the actual NASDAQ button worked. By the time NASDAQ arrived on Wednesday, a few other engineers caught wind of the project and offered their help. So five of us headed over to the conference room to check out the button. NASDAQ was game and allowed us to dismantle the button, with only one rule: don’t break it.

As we unscrewed the cover and poked around inside, we discovered that it looked quite different from what we were expecting. While the system wasn’t too complicated (a touch pad, a light, and grey box containing some relays connecting to the power supply), our hack was going to prove a bit of a challenge. We plied open the gray box to test the various circuits and figure out exactly how they worked. After some delicate tests with a voltmeter, we came up with a solution.

A couple of us then headed off to Radio Shack to pick up a couple relays, capacitors, and resistors. A couple of hours later, we had built our hack. The finished product wasn’t exactly the prettiest thing, but hacks aren’t supposed to be. They’re just supposed to work.

We ran back to the conference room with the button to make sure it did.

We hooked up our hack to run at exactly the same time as Mark pushed the button to turn on the light and ring the bell. Then we attached a wire that hooks to the hack and into the headset jack of a cell phone. When the button was pressed, it sent a signal through the hack, and the phone got the signal that triggered the custom action through our Open Graph API, posting a story onto Mark’s Timeline. It worked.

“Mark listed a company on NASDAQ – FB – with Chris Cox (VP of Product) and 4 others [Sheryl Sandberg (COO), David Ebersman (CFO), Cipora Herman (Treasurer), and Dave Kling (Deputy General Counsel)”

In less than 3 days, an idea became reality, something that would be seen by people all around the world.  So, like I said, it was just a normal day here at Facebook.

~The Best Of TechCrunch’s Facebook IPO Coverage~

Video & Photos: Facebook CEO Mark Zuckerberg Rings In The NASDAQ Bell

No IPO Pop Here: Facebook Trades Slightly Higher At Around $40

Facebook’s Key Executives And Shareholders: What Is Everyone Worth?

Zuckerberg Receives Hoodie, Says “Our Mission Isn’t To Be A Public Company” In Pre-IPO Remarks

How Facebook Hacked The NASDAQ Button

Zynga Shares Go On Wild Ride During Facebook IPO — Big Fall, Then Recovery

Facebook Says Haters Gonna Hate, Likers Gonna Like