Adding Facebook Connect to the to-do list app
Adding Facebook Connect to our web-based version of the app is straightforward. You will need to sign up for a new app (or use the current one) from https://developers.facebook.com/ and take note of the app ID and app's secret key. Then, as usual, you will need to initiate your app using some Facebook-specific JavaScript and library "namely" Facebook's JavaScript SDK.
In case you are wondering, the Facebook Connect plugin is used to perform Facebook login in PhoneGap apps.
Initializing and preparing for Facebook Connect
Let's quickly dive into the source code for index.html
:
<!doctype html>
<html ng-app="todoApp">
<head>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<style>
body {
padding: 40px 20px 0 20px;
}
</style>
</head>
<body>
<div id="fb-root...