- Choosing a Library
- Registering with Providers
- Installing the HybridAuth Library
- Communicating with Twitter
- Conclusion
Installing the HybridAuth Library
Once you’ve registered your application with the service providers you want your site to work with, you can install the HybridAuth library. It’s a short and simple process:
- Download the HybridAuth library from http://hybridauth.sourceforge.net/download.html.
- Expand the downloaded file to access its contents.
- Copy the hybridauth directory from the resulting folder to your website.
- Make the hybridauth/config.php file writable.
- Go to http://www.example.com/hybridauth/install.php. Replace “http://www.example.com” with your actual domain name, of course.
- Configure all the providers you want to support. This is mostly a matter of choosing Enabled/Disabled and then entering two pieces of information for each (see Figure 2). The first is a public identifier (application ID or public key); the other is a secret key. These values will be provided by each provider when you register your application.
- Click “Setup HybridAuth” (at the bottom of the page).
- Delete the hybridauth/install.php file.
- Change the permissions on config.php back to something more appropriate, such as 755.
You’ll need to temporarily make this file writable by the webserver. To do that, change its permissions to 777 (in UNIX terms). If you’re unsure what this means, look online or talk to your web host for details.
Figure 2 Configuring HybridAuth to support Twitter.
And that’s it! You should be able to use the HybridAuth library now.