I am quite new to Linq2Twitter. There aren't much samples either. I took an existing app made using Linq2Twitter and using it's code verbatim (except the keys in configuration obviously). Whenever it reaches AuthorizeAsync(), it fails:
var auth = PerformAuthorization();
try
{
await auth.AuthorizeAsync();
}
catch (Exception ex)
{
MessageBox.Show("\n\nPlease make sure that:"
+ "\n\t- your computer's date/time is accurate;"
+ "\n\t- you entered the exact PIN returned by Twitter."
+ "\n\n\nTwitter error message: " + ex.Message,
"Twitter Archive Eraser");
return;
}
How should I fix it now?
It sounds like you might be receiving an HTTP 401 Unauthorized error, which surfaces as an exception. You can look at the details of the exception instance to learn more about the specific problem. LINQ to Twitter also includes the Twitter API response in exception messages. There are many reasons why a 401 error can occur and I've written a FAQ to help you figure this out:
There are several demos for various technologies in the downloadable source code:
The Console demos have an example of all the API calls. The documentation also has examples of every API call: