HTML and CSS Reference
exeRCiSe A-1: BUiLd A SiMpLe LOGin SYSTeM USinG
OAUTH And FACeBOOK
Let's get our hands dirty with OAuth by building a very simple app that will just allow a user to log in using their
this app will forego CSS styling and any non-essential markup because a reasonable amount of php is required
to achieve the desired functionality. You will be building an abstract php class to define basic OAuth 2.0 workflow
and then extending that class with a Facebook-specific class that defines endpoints, credentials, and Api
this app will consist of five files: two php classes, a configuration file, a login file, and the app's home page.
Step 1: Register Your App with Facebook
to register your app with Facebook, start by navigating to https://developers.facebook.com/apps . Once
there, click the Create new App button at the top right of the screen. A modal window will appear asking you to
name your app (see Figure A-3 ).
Figure A-3. The modal dialog to register a new app with Facebook
next, you'll be taken to the app's home screen. inside, check the boxes to indicate that the app will allow login on
a website and that it will also be a mobile app (see Figure A-4 ).