HTML and CSS Reference
In-Depth Information
Figure A-4. The app home screen on Facebook
Save those changes, and the app is registered. Make a note of the App id and App Secret at the top of the page;
they will be used to obtain authorization later on.
Step 2: Create a Base OAuth Class
the first step is to create the abstract class that will handle all general OAuth 2.0 workflow. the reason for
making this class abstract is that it can't work without first having a service provider to whom requests should be
made. the reason for separating this class from the Facebook-specific class is that it will prevent duplicate code
if this app were to add a second service provider as an option for login.
in web root, create a folder called includes , and inside create a new file named . to
start, add some basic checks and declare this class:
// Makes sure cURL is loaded
if (!extension_loaded('curl')) {
throw new Exception('OAuth requires the cURL PHP extension.');
Search WWH ::

Custom Search