Twitter App Creation
Twitter is one of the popular and most used social networks. Millions of people around the world are connected with Twitter. When the login system integrated into your web application, login with Twitter surely helps to make login process smoother for the user. The main facility of Twitter login is the user does not need to create an account for log in your website. They can log into your website with their Twitter account. Also, you can get the user profile details from Twitter when they login with Twitter.
Twitter Apps Creation
Consumer Key and Consumer Secret is needed to use Twitter OAuth library and it can get from Twitter App. That’s why you need to create a Twitter App first.
- Go to the Twitter Application Management page and sign in with your Twitter account credentials.
- Click Create New App button
- Enter the following details to create a new Twitter apps.
- Name: Your application Name. This is shown to the user while authorizing.
- Description: Your application Description. This is shown to the user while authorizing.
- Website: Your application website. (http://example.com)
- Callback URL(*): After authorization, this URL is called with oauth_token. (http://example.com/user_authentication/)
- Change the apps permission to Read and Write or Read, Write and Access direct messages. For change the apps permission, you need to add a mobile number to your twitter account.
- Now you should need to test the OAuthentication, click on Test OAuth and login with your twitter account for test OAuth. After completing you would be redirected to the OAuth Settings page. At the OAuth Settings page, you can see the Consumer Key (API Key) and Consumer Secret (API Secret).
Copy the Consumer Key and Consumer Secret for later use in the script.
Twitter config file location :
application\config\twitter.php