This project has moved and is read-only. For the latest updates, please go here.

MVC5 -Demo

Mar 31, 2014 at 5:48 PM

I'm trying to build a demo app based on the MVC Demo. I have installed LinkToTwitter via NuGet in VS 2013. I see references to both LinkToTwitter.ASP and LinkToTwitterPCL. Everything compiled until a I added this to Startup.Auth.cs. Now it can't find the LinqToTwitterAuthenticationProvider What am I missing? I have the "using Link2Twitter;" Where is this?

           new TwitterAuthenticationOptions
               ConsumerKey = ConfigurationManager.AppSettings["consumerKey"],
               ConsumerSecret = ConfigurationManager.AppSettings["consumerSecret"],
               Provider = new LinqToTwitterAuthenticationProvider()
Mar 31, 2014 at 8:39 PM
Edited Mar 31, 2014 at 8:40 PM

Try spelling your using declaration like this:

using LinqToTwitter;

Also, LinqToTwitterAuthenticationProvider, that is in my blog post hasn't been deployed to NuGet yet.

Mar 31, 2014 at 9:46 PM
I had it as "using LinqToTwitter;", the post above is a typo. I guess I should read the blog and see what I'm missing for LinqToTwitterAuthenticationProvider.

Mar 31, 2014 at 11:05 PM
Edited Mar 31, 2014 at 11:06 PM
OK, @JoeMayo. I found that aforementioned post and now having a working MVC5 app, using just NuGet. I didn't even know about the blog.

So, what I did to get a working MVC5 app.
  1. Add a class called LinqToTwitterAuthenticationProvider, and read @JoeMayo's post above. Everything compiles now, with LinqToTwitter/NuGet.
Hope this helps someone. MVC5 has some cool features like Custom Authentication Filters that work differently than in previous versions of MVC. Great post below.