My problem is rather simple. I want to implement a "logon with Facebook" functionality on a .NET website, actually just get the user's name and email from Facebook and pass that along to my own logon-mechanism.
My scenario is (see attached text file):
I have a page "[url removed, login to view]" with the given Razor C# code.
On first request in contacts the [url removed, login to view] oauth to retreive an access token.
Sometimes that part seems to retreive an access token - but mostly it just fails with an: [url removed, login to view]: The remote server returned an error: (400) Bad Request. at [url removed, login to view]()
In those situations where it doesn't fail i seem to receive an access token, I pass the access token to my own login method, which using the Facebook API will make calls to retreive the name, email of the user. However this part fails with: "(OAuthException - #190) Invalid OAuth access token."
So please help me with:
1. Finding/explaining what is wrong with my approach in the above
2. Alternatively provide me a way to achieve what I want.