Application only authentication

May 29, 2013 at 8:08 AM
Hi, can some point me to an example where a visitor to my website could see public feed from any twitter account, and that particular users won't require to supply any credentials.

I want to get the result as was returned earlier in v1 of twitter API by
May 29, 2013 at 8:50 PM

Here's the LINQ to Twitter documentation for the User timeline:

The Twitter API now requires authentication on all API calls.

Jun 24, 2013 at 10:10 PM
Is there any sample code showing how to authenticate with Application-only authentication?
Jun 24, 2013 at 10:17 PM

Yes, there's a demo in the downloadable source code, in the OAuthDemos.cs file of the LinqToTwitterDemos project. It looks like this:
        private static void HandleApplicationOnlyAuthentication()
            var auth = new ApplicationOnlyAuthorizer
                Credentials = new InMemoryCredentials
                    ConsumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"],
                    ConsumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"]


            var twitterCtx = new TwitterContext(auth);

            var srch =
                (from search in twitterCtx.Search
                 where search.Type == SearchType.Search &&
                       search.Query == "LINQ to Twitter"
                 select search)

            Console.WriteLine("\nQuery: {0}\n", srch.SearchMetaData.Query);
            srch.Statuses.ForEach(entry =>
                    "ID: {0, -15}, Source: {1}\nContent: {2}\n",
                    entry.StatusID, entry.Source, entry.Text));
Jun 24, 2013 at 10:22 PM
Thanks Joe! I'll give it a try.
Nov 30, 2013 at 8:00 PM
This is a great library. You save my life Joe Mayo. Thank you very much!!
Note: You should put that example on the homepage of the linqtotwitter site. I was looking something like that for hours.