BrettKB
BrettKB

Reputation: 205

MVC 5.2 Facebook C# SDK 6.8.0 - Type or Namespace "FB" could not be found

I am trying to follow this tutorial to access more user information when they log in using Facebook. Get more information from Social providers used in the VS 2013 project templates

Ultimately I would like to be able to get data such as the user's firstName, lastName, Zip, etc. when a user logs in using Facebook and store that in the AspNetUsers table when they register. I will try this link.

For now I would just like to get this tutorial working but it is slightly different from my MVC 5.2.2 project. I am getting a 'type or namespace name "FB" could not be found. How can I fix this error?

Also, the ExternalLoginCallback is different, would I add the "await StoreFacebookAuthToken(user);" above var result = await SignInManager.ExternalSignInAsync(loginInfo, isPersistent: false);?

Upvotes: 0

Views: 338

Answers (1)

BrettKB
BrettKB

Reputation: 205

Solved:

I opened the Package Manager Console and it displayed a message which said that I was missing assemblies and it gave me the option to Restore the assemblies.

Than I received an error, "Could not load file or assembly 'System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified." So I went to Manage NuGet Packages for Solution... and I just updated everything then it worked.

Upvotes: 1

Related Questions