Watch this short screencast to see our AM2 application in action. Scroll down the page to press the play button.
In the third week, we will learn about the Facebook API and use it to create interesting apps with data from Facebook. Differently from the APIs that we saw in AM1, Facebook requires user authentication to access data from its API. Thus, we will learn to use the Facebook API to login a user, give permissions to our app, and send API requests for information we are interested in.
The example shown in the screencast searches the API for all pages that contain the search query "Wellesley College", then retrieves the information for each page (name, cover photo, number of likes, and link), checks to see if any of these pages has been liked by the logged in user, and then displays the results in two groups.
The purpose of the app is to make the user aware of the presence of different Wellesley orgs and departments in Facebook and encourage them to check them out.
Differently from AM1, you do not need to figure out how to create this app from scratch. On Tue (Feb 9), we will have a Facebook tutorial in class. By the end of the class, you should be able to retrieve the data in the console. Once you have the data in the console, the task is very similar to AM1, and you will write Javascript code to display the desired fields on the page.
Share your ideas for interesting ways to use Facebook data in this
Google doc.
We will discuss them, choose the ones that are doable in a short amount of time,
and use them as a "variation on the theme" for AM2.
Given that no ideas were suggested, this time we will only recreate the screencast. You might want to return to the Facebook API for future AMs and projects.
The goal in this AM is to implement an app very similar to the given screencast. You will learn about getting data from the Facebook API, but also about working with Javascript objects and making the page interactive.
There are 10 points for this assignment, which are divided as follows:
Here are instructions for how to submit your work.
cs249
folder you created for AM1, add the folder AM2
.
index.html
file to add the link to your am2.html
page.
AM2
should have three files am2.html
,
am2.js
and am2.css
that you wrote to
develop your new app.
/* Filename: am2.js Author: Wendy Wellesley Date: Feb 13, 2015 Goal: Javascript code for implementing a web app that works with the Facebook API. Honor Code Statement: On this task I collaborated with Harry Potter and Hermione Granger. I had difficulty with the XXX issue, but Hermione gave me a good example to understand it. All the code in these files was typed by me. */
Due to our inability to test the "Likes" portion of your app using our own accounts, please take a screenshot of you entire laptop screen, save it as an image file and upload it in your AM3 folder. To take a screenshot in Mac you can use Ctrl+Shift+3 (entire screen) or Ctrl+Shift+4 (select the part you want). In Windows, you can use instructions in this page.