4

I have a question to whoever using Twitterizer as a component to communicate with Twitter API.

I see recent update from Twitter site, to API version 1.1

I have an app built using Twitterizer version 1.

Please let me know if Twitterizer has updated their component to be compatible with new Twitter API 1.1

I see there are two updated versions from Twitterizer, version 2.4.2 and version 3..

swcraft
  • 2,014
  • 3
  • 22
  • 43

3 Answers3

5

A brief walk through the source code provided by twitterizer suggests that their API target hasn't been updated yet.

The lines of code that call this into question are at Twitterizer/Twitterizer2/Core/OptionalProperties.cs at https://github.com/Twitterizer/Twitterizer starting at line 50. Here's a snippet.

    public OptionalProperties()
    {
        // Set the default values for the properties
        this.UseSSL = false;
        this.APIBaseAddress = "http://api.twitter.com/1/";
    }

There are quite a bit of source code that look like it will need to be checked against v1.1, but you could try building the library with the version number in the APIBaseAddress symbol changed from /1/ to /1.1/ to see what breaks, and perhaps send a pull request with updates if you're up to it.

A complete list of the REST API methods for 1.1 is here. (@ dev.twitter.com)

Footnote: Twitterizer3 has the same base endpoint URL too. (@ github)

meklarian
  • 6,595
  • 1
  • 23
  • 49
  • Thanks, yeah I have done similar test with above using Twitterizer version 2.0.0 couple months ago and saw the Twitter API still returning data fine.. although I suspect Twitter still supporting their API 1.0 (until March), maybe server is redirecting? Hope not, because then above attempt will not mean actual call to 1.1 but redirect to 1.0 ? – swcraft Feb 01 '13 at 00:30
  • per their overview here: https://dev.twitter.com/docs/api/1.1/overview it looks like 1.0 will be shut off on March 5th, 2013, which is coming up soon. in the meantime, it is still running, and if past behavior is any indication, there won't be any redirection setup to 1.1 endpoints. – meklarian Feb 01 '13 at 00:32
  • Sorry could you rephrase your comment? It sounds like there could be redirection so that it seems working but not after March 5th, which is what I am concerned about.. – swcraft Feb 01 '13 at 00:47
  • 2
    In short, there won't be any redirection. In the past they haven't done HTTP redirection from endpoint to endpoint when introducing new versions of API methods. Version 1.1 is actually their 3rd public generation of their API, and for some methods, such as search, redirection would cause problems as the semantic meaning of data returned (user ids) has changed between versions. – meklarian Feb 01 '13 at 00:50
  • I double checked the history of the search API and potential breaking changes have even occurred in the same generation of the endpoint. See v1.0 https://dev.twitter.com/docs/api/1/get/search – meklarian Feb 01 '13 at 00:54
0

An updated version of Twitterizer that supports Twitter REST API 1.1 has been made available via BitBucket, the source code can be downloaded from here:

https://bitbucket.org/szrsharp/twitterizer-remaked-for-api-1.1/overview

I built the Twitterizer2 solution and copied the output DLLs into my project and the Twitter posts are working again.

There is some more information about this updated project on Code Project and the Author has responded to some comments at the bottom.

Rob Willis
  • 4,706
  • 2
  • 28
  • 20
0

The answer from Rob Willis doesn't seem to be working anymore. Since I had the same problem (using Twitterizer in an old .NET 3.5 application) I switched to TweetSharp, which AFAIK is the only library available for .NET 3.5 (and also 2.0) with Twitter API 1.1 support.

For further information you can read my answer here.

I can personally guarantee that it works because I used it in an old 3.5 project and I managed to make it work (in fact it saved my day).

Community
  • 1
  • 1
Darkseal
  • 9,205
  • 8
  • 78
  • 111