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.
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. Backend services and functions are written in C++, Java, Python, and Erlang1Sources: 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/)
19. What Makes Facebook Tick Can you identify the back-end programming languages Facebook uses? def hello(): print "Hello World!" return -module(hello).-export([start/0]).start() ->spawn(fun() -> loop() end).loop() ->receivehello ->io:format("Hello, World!~n"),loop();goodbye ->okend. #include <iostream> int main() { std::cout << "Hello, world!"; return 0; } class myfirstjavaprog { public static void main(String args[]) { System.out.println("Hello World!"); } }
20. What Makes Facebook Tick Can you identify the back-end programming languages Facebook uses? def hello(): print "Hello World!" return -module(hello).-export([start/0]).start() ->spawn(fun() -> loop() end).loop() ->receivehello ->io:format("Hello, World!~n"),loop();goodbye ->okend. Python > C++ > #include <iostream> int main() { std::cout << "Hello, world!"; return 0; } class myfirstjavaprog { public static void main(String args[]) { System.out.println("Hello World!"); } } ^Erlang Java >
21.
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.
24. The scripts (or “apps”) are written and stored on a development server (Not on Facebook)
25. The Facebook application model gives developers freedom in creating applications because they are not hosted on the Facebook
28. There are two key things you need in order to start development: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. 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.
29. Developing Facebook Apps Once you have developer access and a development server with appropriate files setup, you’re able to begin development.
32. Questions and Answers Question 1: What is the architecture Facebook is based on and what is the front-end programming language? Answer: LAMP and PHP Question 2: How many active users does Facebook have and what percentage of web traffic does Facebook represent? Answer: 400 million and 7.07% Question 3: What are the four programming languages that are used for the back-end services on Facebook? Answer: C++, Java, Python, and Erlang
33. Questions and Answers Question 4: When did Facebook launch third-party applications and what is used to create applications? Answer: Launched in 2007; the “Facebook Developers” group Question 5: What two key things do you need to have in order to develop Facebook applications and what do they do? Answer: A API Key, Application Secret and the Facebook Client PHP Library