Friday, November 29, 2013

Twitter app using perl – Part 1


Hi All,

I thought it would be nice quest to create an aap with Step by Step guide.
Here in this series , I will gonna create an app for twitter using Cpan module “Net::Twitter“.


Step 1 .
You need to create an account on dev.twitter.com and need to register your new app.

Step 2.
If you have already finished up with step one , by now you must be having following details for new registered app
Consumer key
Consumer secret
Access token
Access token secret

Do not share your oauth_token_secret with anyone.As it is used to access your twitter account

Step 3.
Install the cpan module ”Net::Twitter

Now you are ready for a simple app

Here in this app I will try to list out all my friend list  and further in the series we will upgrade the app for adding other functionality.




Here U can see I have assign the variable $r to hash %temp at line 29 and dumped  the output using dumper.
As the return data is quite complex , it will most easiest to see the structure of the return data using Dumper.
Here I am printing the list of my friend name , you can further explore other keys of the hash as per your choice.
Hope you enjoyed the tutorial.

original source : link

No comments:

Post a Comment