Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DotNetOpenAuth and Facebook

I'm attempting to use DotNetOpenAuth for some web single sign on functionality.

I got the samples working for Google and Yahoo but am struggling with Facebook.

I am using the CTP (4.0.0.11165) and have followed the example in this SO question.

However, I get a runtime error on the line:

IAuthorizationState authorization = client.ProcessUserAuthorization();

The error is:

Failed to obtain access token. Authorization Server reports reason: (unknown)

Any ideas?

like image 957
DaveM Avatar asked Jul 12 '11 15:07

DaveM


1 Answers

The build you're using is incompatible with Facebook because Facebook is using an older spec of OAuth 2.0. You have to use an earlier CTP (one with a v3.5 version) to work with Facebook. Sorry. It stinks to be using OAuth 2.0 when everyone is on a different draft of the unfinalized spec.

like image 173
Andrew Arnott Avatar answered Oct 20 '22 00:10

Andrew Arnott