Requestparameter duplication when requesting a stream


Hi Joe,

I noticed some strange behavior when requesting filter streams. Streams with a larger number of filter values (>20) result in an ArgumentException in TwitterExecute.GetBasicStreamRequest on line 655 due to duplicate requestparameters that can not be converted to a dictionary.

This description applies to WinRt and the ffbabcf9f7d3 commit.
I do a stream request like this:
                        stream = (from strm in twitterCtx.Streaming
                                  where strm.Type == StreamingType.Filter &&
                                      strm.Track == filter
                                  select strm)
                        .StreamingCallback(strm =>
                            // stream callback handling
When stepping through the code I found that the request will always have it's requestparameters duplicated. This is the call sequence resulting in the duplication:

extracts a dictionary of postdata from request and calls OAuthAuthorizer.PostRequest with the request and postdata

calls OAuthTwitter.GetOAuthQueryStringForPost

adds a dictionary of postdata to the request as requestparameters resulting in duplicate requestparameters

With longer filter values TwitterExecute.GetBasicStreamRequest is called a second time resulting in the mentioned exception.


Roland Smeenk
Closed Mar 21, 2013 at 4:43 AM by JoeMayo
Removed the code that was adding the extra parameters.


grennis wrote Mar 20, 2013 at 6:21 PM

We ran into this also.