You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2021. It is now read-only.
Hello, thank you for providing this useful nuget!! However, I'm having a problem fetching user data from the twitter API. This is my code snippet:
var client = OAuthRequest.ForProtectedResource("GET", _apiKey, _apiKeySecret, oauthToken, oauthTokenSecret);
client.RequestUrl = requestUrl;
var auth = client.GetAuthorizationHeader();
Method GetAuthorizationHeader on an OAuthRequest instance throws an exception with a message: "Failed to compare two elements in the array." InnerException message: "Object reference not set to an instance of an object." and StackTrace "at OAuth.OAuthTools.<>c.b__19_1(WebParameter x, WebParameter y)\r\n at System.Collections.Generic.ArraySortHelper1.InsertionSort(T[] keys, Int32 lo, Int32 hi, Comparison1 comparer)\r\n at System.Collections.Generic.ArraySortHelper1.IntroSort(T[] keys, Int32 lo, Int32 hi, Int32 depthLimit, Comparison1 comparer)\r\n at System.Collections.Generic.ArraySortHelper1.IntrospectiveSort(T[] keys, Int32 left, Int32 length, Comparison1 comparer)\r\n at System.Collections.Generic.ArraySortHelper1.Sort(T[] keys, Int32 index, Int32 length, Comparison1 comparer)"
When I use different approach:
var client = new OAuthRequest
{
Method = "GET",
Type = OAuthRequestType.ProtectedResource,
SignatureMethod = OAuthSignatureMethod.HmacSha1,
ConsumerKey = _apiKey,
ConsumerSecret = _apiKeySecret,
Token = oauthToken,
TokenSecret = oauthTokenSecret,
RequestUrl = requestUrl,
Version = "1.0a"
};
var auth = client.GetAuthorizationHeader();
I get the same error. I cannot identify the cause of this issue because fetching request and access token works just fine. Hope anyone can help me with this :)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello, thank you for providing this useful nuget!! However, I'm having a problem fetching user data from the twitter API. This is my code snippet:
Method GetAuthorizationHeader on an OAuthRequest instance throws an exception with a message: "Failed to compare two elements in the array." InnerException message: "Object reference not set to an instance of an object." and StackTrace "at OAuth.OAuthTools.<>c.b__19_1(WebParameter x, WebParameter y)\r\n at System.Collections.Generic.ArraySortHelper
1.InsertionSort(T[] keys, Int32 lo, Int32 hi, Comparison
1 comparer)\r\n at System.Collections.Generic.ArraySortHelper1.IntroSort(T[] keys, Int32 lo, Int32 hi, Int32 depthLimit, Comparison
1 comparer)\r\n at System.Collections.Generic.ArraySortHelper1.IntrospectiveSort(T[] keys, Int32 left, Int32 length, Comparison
1 comparer)\r\n at System.Collections.Generic.ArraySortHelper1.Sort(T[] keys, Int32 index, Int32 length, Comparison
1 comparer)"When I use different approach:
I get the same error. I cannot identify the cause of this issue because fetching request and access token works just fine. Hope anyone can help me with this :)
The text was updated successfully, but these errors were encountered: