Don't waste precious hack time by writing
a login system from scratch.
We're using the Javascript SDK in this presentation.
Show the FB Login button, since the user isn't logged in.
The user is logged in! You can immediately access the current user's ID and profile pic. Your app can save this ID to your backend to identify returning users.
Uninstall the app to log out: App Settings
Why create fake data to put in your app when you can use the real stuff instead?
Read from the graph: newsfeed, check-ins, photos, music listens, messages, events, liked movies/books/sports, friends (and more)
Write to the graph: make status updates, upload photos and videos, add a check-in, create events (and more)
Demo: Members of the Stanford HackingHours Facebook Group
FB.api( '//members?fields=picture,name', function(response) { /* Here's where you handle the response. * To inspect this call in the API explorer */ } );
Demo: Recent Music Listens
FB.api( '/me/music.listens', function(response) { /* Here's where you handle the response. * Be sure user_actions.music is in your access token! * To inspect this call in the API explorer click here. */ } );
Facebook Login = personalize the experience
Graph API = get real data (judges can actually try your app!)
Social Plugins + Notifications = integrate with Facebook