Hi there,
I am experiencing some inconsistent behavior when utilizing the library. I am trying to retrieve tweets as so:
```
private IOAuthCredentials Credentials { get; set; }
//class constructor
public Twit()
{
Credentials = TwitterCredentials.CreateCredentials(
"...",
"...",
"...",
"..."
);
}
//function call which throws error
public List<ITweet> SearchInPosts(string query)
{
List<ITweet> inPosts = new List<ITweet>();
TwitterCredentials.ExecuteOperationWithCredentials(Credentials, () =>
{
var searchParam = Search.GenerateSearchTweetParameter(query);
searchParam.Lang = Language.English;
searchParam.MaximumNumberOfResults = 1000;
searchParam.TweetSearchFilter = TweetSearchFilter.OriginalTweetsOnly;
inPosts = Search.SearchTweets(searchParam); //ERROR comes from searchParam
});
return inPosts;
}
```
I'm losing my mind trying to solve this problem. I get a proper return the first few tries, then subsequently after that, I encounter this error. It also seems that I have to wait a certain amount of time to have it work again, but that may be my imagination. There also appears to be no attribute for "name" in searchParam, which leads to more confusion on my part.
I have also tried using "SetCredentials" as described in [this post](https://tweetinvi.codeplex.com/workitem/2225), but still no luck.
Am I using the library correctly? Or am I missing something completely?
I am experiencing some inconsistent behavior when utilizing the library. I am trying to retrieve tweets as so:
```
private IOAuthCredentials Credentials { get; set; }
//class constructor
public Twit()
{
Credentials = TwitterCredentials.CreateCredentials(
"...",
"...",
"...",
"..."
);
}
//function call which throws error
public List<ITweet> SearchInPosts(string query)
{
List<ITweet> inPosts = new List<ITweet>();
TwitterCredentials.ExecuteOperationWithCredentials(Credentials, () =>
{
var searchParam = Search.GenerateSearchTweetParameter(query);
searchParam.Lang = Language.English;
searchParam.MaximumNumberOfResults = 1000;
searchParam.TweetSearchFilter = TweetSearchFilter.OriginalTweetsOnly;
inPosts = Search.SearchTweets(searchParam); //ERROR comes from searchParam
});
return inPosts;
}
```
I'm losing my mind trying to solve this problem. I get a proper return the first few tries, then subsequently after that, I encounter this error. It also seems that I have to wait a certain amount of time to have it work again, but that may be my imagination. There also appears to be no attribute for "name" in searchParam, which leads to more confusion on my part.
I have also tried using "SetCredentials" as described in [this post](https://tweetinvi.codeplex.com/workitem/2225), but still no luck.
Am I using the library correctly? Or am I missing something completely?