RSS Feed to Update Twitter Status using Perl Script with OAuth Part-I (Registration of Twitter Application)
Every blogger or the person who is connected with Internet to get latest news, updates, informations etc. knows the importance of RSS Feeds. RSS (Really Simple Syndication) is a family of web feed formats used to publish frequently updated works on blog or on websites. Users subscribe to their favorite blogs or news websites so they will be intimated as soon as those blogs or news websites are being updated and a new content or post has been published.
Recently I started working on a Social News bookmarking website i.e. http://sitemarks.in which fetch news from various websites and publishes it on its page for which I have used Hotaru CMS and some of its plugins. Now I want to publish the news on my Twitter accounts so all the news which are fetched by the site will be published on twitter so that my twitter account follower can check those news and there are N number of websites which to perform this task but whats so interesting about that????
So I decided to build something to perform above task using PHP First and searched on Google (As I am not good it scripting but I like to test and implement various scripts). After a long search I found abraham-twitteroauth beta which was working fine for me but due to some problems I thought is that possible to do same task using Perl?? I discussed this with my friend who is expert in Perl Scripting and he assured me that its possible. So I will explain how to post updates of RSS Feeds to Twitter using Perl Script. This complete Tutorial will be divided in to two Parts and they are:
- RSS Feed to Update Twitter Status using Perl Script with OAuth Part-I (Registration of Twitter Application)
- RSS Feed to Update Twitter Status using Perl Script with OAuth Part-II (Installation of Perl Modules, writing perl script and Integrating it with OAuth)
Registration of Twitter Application
To create any automate script which will update Twitter account you will have to go pass the Oauth authentication and it can be done using creating your own twitter application. So, today in this post I will going to tell you about developing/registering your own twitter application.
1) Sign-in to your twitter account and browse http://dev.twitter.com/. Now click on “Register an app“
2) Now you will see a form like below
Fill following details in it
- Application Name: Enter the name you want to set for the Application
- Description: Description of your Application
- Application Website: Enter the address of your website
- Organization: Your Organization Name
- Application Type: Select Client as we are going to use Perl script which will be executed from your web server.
- Default Access Type: Select Read and Write.
- Application Icon: You can set icon for your application.
- Captcha: Fill the Captcha and press “Register“.
Your Form should look like following image.
Accept the terms and condition when popup comes.
3) Thats it, your twitter application is registered and twitter will take you to application window. From your application copy following items and save it for future.
From main application window
- Consumer key
- Consumer secret
From My Access Token
- Access Token (oauth_token)
- Access Token Secret (oauth_token_secret)
NOTE: MAKE SURE NOT TO SHARE THESE KEYS WITH ANYONE AS THEY ARE PRIVATE KEYS OF YOUR APPLICATION.
In next article we will explain the Perl script to update Twitter status.