This project has moved and is read-only. For the latest updates, please go here.

SingleUserAuthorizer in WinRT throws exception - newbie

May 23, 2012 at 4:01 AM

The code below throws*/works as commented.

var auth = new SingleUserAuthorizer
    Credentials = new InMemoryCredentials
        ConsumerKey = "DK0...", // twitter Consumer key
        ConsumerSecret = "nWw...", // twitter Consumer secret
        OAuthToken = "727...", // twitter Access token
        AccessToken = "7vq..." // twitter Access token secret
// var twitterCtx = new TwitterContext(auth); // <-- throws exception
var twitterCtx = new TwitterContext(); // <-- works
var searchResponse = (from tweet in twitterCtx.Search where tweet.Type == SearchType.Search && tweet.Query == "john_hauck" select tweet);
foreach (var t in searchResponse)
    foreach (var s in t.Results)

An exception of type 'System.ArgumentException' occurred in LinqToTwitterRT.DLL but was not handled in user code
Additional information: Value does not fall within the expected range.
OAuthBase.cs, Line 79: CryptographicKey cryptoKey = mac.CreateKey(keyMaterial);


May 23, 2012 at 5:51 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 23, 2012 at 5:53 AM


Thanks for letting me know about the bug.  I'm marked it as an issue to be resolved.  I don't know if I'll get it today, but I've marked it as high priority.


May 23, 2012 at 6:51 AM

Fixed. You can download the new binary here: