开发者

Utilising the SelectorProviderButton with facebook/twitter in DotNetOpenAuth 4.0 CTP

I'm trying to get my head round using DotNetOpenAuth and whilst I have had a certain amount of success following the source from the nerddiner project, I have hit some snags.

By the looks of things see here, though it appears that the version used in nerddinner (3.4.6.10357) nor the one on Nuget (3.4.7.11121) will not allow me to use Facebook or Twitters implementation. This is a bit of a killer blow for me using it.

I have found a sample using the OAuth 2.0 CTP here but that does not use the same ajax system as the nerddinner 开发者_运维知识库sample utilising the SelectorProviderButton.

Does anybody have an example of the two methods working together? I'm finding it very difficult to get any decent information.


DotNetOpenAuth v3.4.x fully supports OAuth 1.0a, which is all that Twitter uses. So you should have no problem authenticating with Twitter.

Facebook uses OAuth 2.0, an older draft of the unfinalized spec, that is. So yes, you either code this up by hand in your app (which is actually quite easy) or you can use an (older) CTP of DotNetOpenAuth OAuth 2.0 preview. I say older because the newer builds of OAuth 2.0 preview implement a more recent draft than Facebook does, so it's incompatible.

I recommend given the crazily ill-state of affairs with OAuth 2.0, that you just follow Facebook's docs as an OAuth 2.0 client and code up the 2-3 URLs yourself for your app to log into Facebook for now.

BTW, there's no way currently to use SelectorProviderButton's with the OAuth protocol (1.0a or 2.0). It's strictly an OpenID feature.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜