[Mono-list] TweetSharp Failing
abe.gillespie at gmail.com
Wed Mar 3 06:27:09 EST 2010
This is looking like a Mono bug to me. If I edit TweetSharp's source
code to manually set the network credentials like this (at Ln 146,
var creds = new NetworkCredential(_username, _password);
var credCache = new CredentialCache();
var host = request.RequestUri.Scheme + Uri.SchemeDelimiter +
credCache.Add(new Uri(host), "Basic", creds);
request.Credentials = credCache;
then it will work.
TweetSharp relies on HttpWebRequest. I've had a look through Mono's
System.Net/HttpWebRequest.cs source and it appears to me that it drops
the "Authorization" header. This header is what TweetSharp uses to
send along authorization to api.twitter.com and works with Microsoft
Please let me know if this is a bug and I'll file a report with a test
case using TweetSharp.
On Wed, Feb 17, 2010 at 3:02 PM, Abe Gillespie <abe.gillespie at gmail.com> wrote:
> I'm doing something like this:
> var result = FluentTwitter
> .AuthenticateAs("sender", "password")
> .Send("receiver", "tweet tweet")
> On Windows this succeeds. On Mono (Mac & Linux) I'm getting an
> exception with "401 Unauthorized" in the description. Now I've used
> certmgr to install the certs at https://api.twitter.com and
> https://www.twitter.com for both the local user store and the machine
> store. But I'm still getting the error.
> This certainly might be a TweetSharp question, but using the
> TweetSharp source I've traced the failure down to a single WebRequest
> Any ideas on this?
More information about the Mono-list