0
Behind the Face of Facebook<br />Cory Bohon<br />SCSC 450<br />April 20, 2010<br />
What We’re Talking About<br /><ul><li>What Makes Facebook Tick
Background of Facebook Apps
Developing Facebook Apps
Create a “Hello World” Facebook App</li></li></ul><li>Why Make Facebook Apps?<br /><ul><li>Integration with a strong platform
Ability to access user information
Strong API (Application Programming Interface)
Large distribution area
Over 400 million active users
Average User Spends 55 Minutes/Day on FB
Massive Opportunities
More than 70% of FB users use the third-party applications
More than 250 apps have more than 1 million active users
Facebook and resulting apps becoming viral</li></ul>Source: Facebook | Statistics (http://www.facebook.com/press/info.php?...
What Makes Facebook Tick<br /><ul><li>Background: Facebook was started in 2004 by Mark Zuckerberg while attending Harvard ...
LAMP = Linux, Apache, MySQL, PHP/Perl1
Upcoming SlideShare
Loading in...5
×

The Face Behind Facebook

3,130

Published on

A presentation for my online programming class at USC Upstate. It's an overview of the Facebook as a development platform with a sample Hello World application.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,130
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
72
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "The Face Behind Facebook"

  1. 1. Behind the Face of Facebook<br />Cory Bohon<br />SCSC 450<br />April 20, 2010<br />
  2. 2. What We’re Talking About<br /><ul><li>What Makes Facebook Tick
  3. 3. Background of Facebook Apps
  4. 4. Developing Facebook Apps
  5. 5. Create a “Hello World” Facebook App</li></li></ul><li>Why Make Facebook Apps?<br /><ul><li>Integration with a strong platform
  6. 6. Ability to access user information
  7. 7. Strong API (Application Programming Interface)
  8. 8. Large distribution area
  9. 9. Over 400 million active users
  10. 10. Average User Spends 55 Minutes/Day on FB
  11. 11. Massive Opportunities
  12. 12. More than 70% of FB users use the third-party applications
  13. 13. More than 250 apps have more than 1 million active users
  14. 14. Facebook and resulting apps becoming viral</li></ul>Source: Facebook | Statistics (http://www.facebook.com/press/info.php?statistics)<br />
  15. 15. What Makes Facebook Tick<br /><ul><li>Background: Facebook was started in 2004 by Mark Zuckerberg while attending Harvard University1 and was originally called “The Facebook”</li></li></ul><li>What Makes Facebook Tick<br /><ul><li>Behind the scenes: Facebook runs a LAMP configuration
  16. 16. LAMP = Linux, Apache, MySQL, PHP/Perl1
  17. 17. Facebook is the most popular website with 7.07% of all U.S. Internet traffic going to the social networking service -- this is followed by Google at 7.03%2
  18. 18. Backend services and functions are written in C++, Java, Python, and Erlang1</li></ul>Sources: 1 Wikipedia: Facebook (http://wikipedia.org/wiki/Facebook), 2 Hitwise via TechCrunch (http://techcrunch.com/2010/03/15/hitwise-says-facebook-most-popular-u-s-site/) <br />
  19. 19. What Makes Facebook Tick<br />Can you identify the back-end programming languages Facebook uses?<br />def hello(): <br />print "Hello World!" <br />return<br />-module(hello).-export([start/0]).start() ->spawn(fun() -> loop() end).loop() ->receivehello ->io:format("Hello, World!~n"),loop();goodbye ->okend.<br />#include <iostream> <br />int main() <br />{ <br />std::cout << "Hello, world! "; <br /> return 0;<br />} <br />class myfirstjavaprog <br />{ <br />public static void main(String args[]) <br />{ <br />System.out.println("Hello World!"); <br />} <br />} <br />
  20. 20. What Makes Facebook Tick<br />Can you identify the back-end programming languages Facebook uses?<br />def hello(): <br />print "Hello World!" <br />return<br />-module(hello).-export([start/0]).start() ->spawn(fun() -> loop() end).loop() ->receivehello ->io:format("Hello, World!~n"),loop();goodbye ->okend.<br />Python ><br />C++ > <br />#include <iostream> <br />int main() <br />{ <br />std::cout << "Hello, world! "; <br /> return 0;<br />} <br />class myfirstjavaprog <br />{ <br />public static void main(String args[]) <br />{ <br />System.out.println("Hello World!"); <br />} <br />} <br />^Erlang Java ><br />
  21. 21. Background of Facebook Apps<br /><ul><li>Facebook apps let developers expand on the many uses for Facebook
  22. 22. Games like Farmville, Petville, Café World, and others entice users to stay on the social networking service, therefore allowing developers and Facebook alike to make money through advertisements
  23. 23. Facebook apps originally launched in early summer 2007</li></li></ul><li>Developing Facebook Apps<br /><ul><li>These applications are generally written in PHP with a MySQL backend
  24. 24. The scripts (or “apps”) are written and stored on a development server (Not on Facebook)
  25. 25. The Facebook application model gives developers freedom in creating applications because they are not hosted on the Facebook
  26. 26. Developers retrieve information from Facebook by using the Facebook API (Application Programming Interface)
  27. 27. The FBML (Facebook Markup Language) provides shortcuts for retrieving and displaying information.</li></li></ul><li>Developing Facebook Apps<br /><ul><li>To get started with Facebook development, you add an application to your profile called “Facebook Developers” This group gives you access to setting up a new application
  28. 28. There are two key things you need in order to start development:</li></ul>API Key and Application Secret – These two keys provide you with access to the Facebook APIs and services. The Application Secret is used to track your application.<br />The Facebook Client PHP Library – A set to PHP files (classes and libraries) that are stored on your server. Your script will access these files which will in turn connect to the Facebook API. <br />
  29. 29. Developing Facebook Apps<br />Once you have developer access and a development server with appropriate files setup, you’re able to begin development.<br />
  30. 30. The “Hello World” Facebook Application<br /><?php<br />require_once 'facebook.php';<br />$appapikey = ‘XXXXXXXXXXXXXXXXXXXXXXXXXXXX’;<br />$appsecret = ‘XXXXXXXXXXXXXXXXXXXXXXXXXXXX’;<br />$facebook = new Facebook($appapikey, $appsecret);<br />$user_id = $facebook->require_login();<br />echo "<p>Hello, <fb:nameuid="$user_id" useyou="false" />!</p>";<br />echo "<p>Friends:";<br />$friends = $facebook->api_client->friends_get();<br />$friends = array_slice($friends, 0, 25);<br />foreach ($friends as $friend) {<br /> echo "<br>$friend";<br />}<br />echo "</p>";<br />?><br />1.<br />2.<br />3.<br />4.<br />5.<br />6.<br />7.<br />8.<br />9.<br />10.<br />11.<br />12.<br />13.<br />14.<br />15.<br />16.<br />17.<br />18.<br />19.<br />20.<br />
  31. 31. Open_demo();<br />Demo<br />
  32. 32. Questions and Answers<br />Question 1: What is the architecture Facebook is based on and what is the front-end programming language?<br />Answer: LAMP and PHP<br />Question 2: How many active users does Facebook have and what percentage of web traffic does Facebook represent?<br />Answer: 400 million and 7.07%<br />Question 3: What are the four programming languages that are used for the back-end services on Facebook?<br />Answer: C++, Java, Python, and Erlang<br />
  33. 33. Questions and Answers<br />Question 4: When did Facebook launch third-party applications and what is used to create applications? <br />Answer: Launched in 2007; the “Facebook Developers” group<br />Question 5: What two key things do you need to have in order to develop Facebook applications and what do they do?<br />Answer: A API Key, Application Secret and the Facebook Client PHP Library <br />
  34. 34. Close_connection();<br />Additional Questions?<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×