Twitter login CasperJS PhantomJS

After posting few post explaining How to login Facebook using CasperJS and How to login Amazon using PhantomJS I received a dozens of emails askng how to login to Tweeter using CasperJS and to get all tweets from the home page, and I decided to help. You can schedule this script extract some information from your Twitter stram as I’m doing.

In order to post new tweet on Twitter, our first task is to login using into Tweeter. Here is the flow we have to implement:

  • Open Twitter
  • Login using your credentials
  • Get all tweets from the stram

CasperJS working example

I will first implement CasperJS script because sintax is much more simple and easier to understand. Here is the full working example.

PhantomJS working example

Here is working example showing how to login twitter using PhantomJS:

http://code-epicenter.com/wp-content/uploads/2015/12/Twitter-login-CasperJS-PhantomJS-1024x576.pnghttp://code-epicenter.com/wp-content/uploads/2015/12/Twitter-login-CasperJS-PhantomJS-150x150.pngAmir DuranJavaScriptLibrariesProgrammingTutorialsCasperJS,PhantomJS,Twitter
After posting few post explaining How to login Facebook using CasperJS and How to login Amazon using PhantomJS I received a dozens of emails askng how to login to Tweeter using CasperJS and to get all tweets from the home page, and I decided to help. You can schedule this script extract some...