Hacking Thy Fearful Symmetry

Hacker, hacker coding bright
Powered by a Gamboling Beluga

Are You Ready For the Atwitterpocalypse?

created: June 6, 2013

Aaah, nothing like a good, thick slab of histrionics to spruce up a blog entry title...

Ridiculously panicked titles aside, this is more of a reminder than a call to stock up on soup cans and shotgun shells. Version 1 of Twitter's API is scheduled to be put to REST (*snickers*) on June 11th, which means that if your applications are still using the old API, now would be a good time to upgrade to v1.1.

Is your code ready...?

If you are using Net::Twitter, that might be as easy as changing:


my $nt = Net::Twitter->new(
    traits   => [qw/API::REST/],
    consumer_key    => $consumer_key,
    consumer_secret => $consumer_secret,
    access_token    => $token,
    access_token_secret => $token_secret,
);

to


my $nt = Net::Twitter->new(
    traits   => [qw/API::RESTv1_1/],
    consumer_key    => $consumer_key,
    consumer_secret => $consumer_secret,
    access_token    => $token,
    access_token_secret => $token_secret,
);

While they shouldn't affect most use-cases, there are a differences between the two APIs. To know all about them, check out Net::Twitter::Manual::MigratingToV1_1.

... how about your web framework and its plugins?

I got my own wake-up call when berekuk poked me about Dancer::Plugin::Auth::Twitter, which was still using v1.0 of the API. Direct result: Dancer-Plugin-Auth-Twitter v0.05 and Catalyst-Authentication-Credential-Twitter v2.0.0 are both on their way to CPAN, both updated to use v1.1 of the REST API. If you are using one or the other, I highly recommend that you upgrade. Preferably, y'know, before June 11th.

comments powered by Disqus

About the author

Yanick Champoux
Perl necrohacker, ACP writer, orchid lover. Slightly bonker all around. Works at Infinity Interactive