Can not connect in a Windows Phone project

May 5, 2012 at 6:16 PM

I'm trying to use your LinqToTwitter in a WP7.1 project.
I can connect and show the PIN code page, I type it in the TextBox (I copy/paste your sample code), and I have this error :

Error during LINQ to Twitter processing. Please see Error
System.IndexOutOfRangeException: IndexOutOfRangeException at LinqToTwitter.OAuthTwitter.<ProcessAccessTokenResponse>b_9(<>f_anonymousType3'2 <>h_TransparentIdentifier7) at System.Linq.Enumerable.<SelectIterator>d_d'2.MoveNext() at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable'1 source, Func'2 keySelector, Func'2 elementSelector, IEqualityComparer'1 comparer) at LinqToTwitter.OAuthTwitter.ProcessAccessTokenResponse(String& screenName, String& userID, String response) at LinqToTwitter.OAuthTwitter.<>c_DisplayClass4c.<GetAccessTokenAsync>b_4b (IAsyncResult ar) at System.Net.Browser.ClientHttpWebRequest.<>c_DisplayClassa.<InvokeGetResponseCallback>b_8(Object state2) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadPool.WorkItem.doWork(Object o) at System.Threading.Timer.ring()

Do you have an idea of what happened here ?
Thank you very much

May 11, 2012 at 6:49 PM


I posted a message on the Windows Phone Forum:

May 14, 2012 at 2:42 AM


I posted to this thread on Twitter also:

I believe the problem has something to do with updating SSL certificates.  I haven't figured out how to update certificates on the emulator yet.


May 21, 2012 at 4:02 PM


This problem isn't solved yet and I'm still working on it. I'd like to get as many people to respond as possible to a couple questions:

  1. Are you seeing this only on the WP7 emulator or on the device too?
  2. Have you noticed the same problem with other Twitter libraries?



May 21, 2012 at 8:12 PM


1. I'm seeing this on the WP7 emulator and on my device (HTC 7 Mozart)

2. Yes, with TweetSharp (

Jun 5, 2012 at 3:06 AM

Good news, this is fixed.  I've checked in the latest code here:

There's one important thing you must remember to do - make sure the Date/Time on your phone is set correctly.  OAuth uses the current timestamp, which must be the same time, with timezone offset from the Twitter server.  i.e. My time is 9:03 MST (GMT -7) and the Twitter server is 3:03 GMT, so all is good.