I got an email from Barry for this tutorial. The tutorial will be about registering with Facebook and Twitter in PHP. This feature will be so useful for your visitors. They can login and register with their Facebook and Twitter accounts. This will be also good for online marketing.
Create a database and import database.sql file
To run this script you should create a Mysql database and then there is a file called “database.sql”. You have to import it.
Update your database information in the script
Go to config folder and open “dbconfig.php”. Write your database name, database username and database password. Save and close it.
Facebook App Setup
To run this script, you must create Facebook and Twitter app. On this script we’re about to create a Facebook app. To create it, go to https://developers.facebook.com/ and click “Create a new app”.
After creating your Facebook app, you will be receiving Facebook APP ID and Facebook Secret ID. Now go to our config folder, find “fbconfig.php”, open it, add your APP ID and Secret ID, save and close it.
Twitter App Setup
Now we’re going to create a Twitter App for our script. To create it, go to https://apps.twitter.com/app/new.
After creating your Twitter app, you need to click the tab called API Keys in your application page. Get your API key and API secret. Now go to our config folder, find “twconfig.php”, open it, add your API key and API secret, save and close it.
The Last Step: Update your twitter redirecting
This is the last step. Go to “login-twitter.php” and replace yourwebsite.com with your website url.
That’s it. It’s ready to go online now!
To check out a live demo, go to http://formask.me/
Tags: facebook login in php, register with facebook php, register with twitter php, twitter login in php