Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can use Single User Authorization or a newer featured called Application-Only authorization. Here's an example of how to do Application Only with <a href="https://linqtotwitter.codeplex.com/" rel="nofollow">LINQ to Twitter</a>:</p> <pre><code> private static void HandleApplicationOnlyAuthentication() { var auth = new ApplicationOnlyAuthorizer { Credentials = new InMemoryCredentials { ConsumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"], ConsumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"] } }; auth.Authorize(); //auth.Invalidate(); var twitterCtx = new TwitterContext(auth); var srch = (from search in twitterCtx.Search where search.Type == SearchType.Search &amp;&amp; search.Query == "LINQ to Twitter" select search) .SingleOrDefault(); Console.WriteLine("\nQuery: {0}\n", srch.SearchMetaData.Query); srch.Statuses.ForEach(entry =&gt; Console.WriteLine( "ID: {0, -15}, Source: {1}\nContent: {2}\n", entry.StatusID, entry.Source, entry.Text)); } </code></pre> <p>The call to Invalidate is commented out, but you'll want to put a timer on that and Twitter's rule of thumb is to invalidate the bearer token every 15 minutes or so.</p> <p>The LINQ to Twitter site has documentation on <a href="https://linqtotwitter.codeplex.com/wikipage?title=Single%20User%20Authorization&amp;referringTitle=Learning%20to%20use%20OAuth" rel="nofollow">Single User Authorization</a> too. There's a <a href="https://linqtotwitter.codeplex.com/wikipage?title=LINQ%20to%20Twitter%20Samples&amp;referringTitle=Home" rel="nofollow">Samples</a> page on the site and the <a href="https://linqtotwitter.codeplex.com/SourceControl/latest#ReadMe.txt" rel="nofollow">downloadable source code</a> has working demos. BTW, Twitter user tokens generally don't ever expire, so you can store and continue to use the same tokens.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload