I'm using the TweetSharp API, and I need to follow people in a C# List
, however, I'm having trouble. The appropriate code is as follows:
var results = service.Search(new SearchOptions {Q = hashtag}); //hashtag string entered by user
List<decimal> users = new List<decimal>();
foreach (var tweet in results.Statuses)
{
users.Add(tweet.User.Id);
}
foreach (decimal user in users)
{
service.FollowUser(user); //follow each user, the issue is here.
}
Apparently I am using invalid arguments.
The
FollowUser
method takes aFollowUserOptions
type as an argument, not a decimal. Try this: