Facebook的/ Twitter的使​​用dotnetopenauth? [英] Facebook/ Twitter with dotnetopenauth?

查看:134
本文介绍了Facebook的/ Twitter的使​​用dotnetopenauth?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经pretty有多少钱使用 DotNetOpenAuth 库的OpenID工作。现在我想用户能够使用的Facebook 微博即可登录。

I've pretty much got OpenID working using the DotNetOpenAuth library. Now I would like users to be able to use Facebook and Twitter to login.

这需要的OAuth 所以我在寻找关于如何使用OAuth的DotNetOpenAuth教程。

This requires OAuth so I am looking for a tutorial on how to use DotNetOpenAuth OAuth.

我在遇到麻烦试图找到如何做到这一点一些简单的教程。

I'm having trouble trying to find some simple tutorials on how to do this.

任何人都可以请帮助?

推荐答案

在我的时间回答这个问题,DotNetOpenAuth拥有的大众社区技术preVIEW(CTP),这是可供下载

At the time of me answering this question, DotNetOpenAuth has a public Community Tech Preview (CTP) which is available to download.


  1. 下载源$ C ​​$ C。应该是一个.7z压缩文件。您可以使用的7-Zip解压缩code 的,如果你不已经拥有了它(完全免费)。

  2. 打开了样品源$ C ​​$ C在Visual Studio解决方案。我使用VS2010,但我认为还有一个VS2008解决方案文件。

  1. Download that source code. Should be a .7z file. You can use 7-Zip to unzip the code if you don't already have it (it's free).
  2. Open up the samples source code solution in Visual Studio. I'm using VS2010 but I think there's also a VS2008 solution file.


  1. 现在,开拓为 OAuthClient 项目的Web.config文件。

  1. Now, open up the web.config file for the OAuthClient project.

接下来,编辑以下设置: -

Next, edit the following settings :-

< - 拍式:http://developers.facebook.com/setup/ - >

<添加键=facebookAppIDVALUE =------/>

<添加键=facebookAppSecretVALUE =------------/>

您可以在Facebook上与应用程序获取这些值。

You can get these values from your application on Facebook.


  1. 调试/运行OAuthClient Web应用程序。这将启动卡西尼/ Visual Studio开发人员Server实例和网络浏览器应打开:

瞧!你现在可以连接到Facebook登录。

Voilà! you can now connect to Facebook to log in.

如果你得到的错误,那么你需要确保:

If you get errors, then you need to make sure that:


  1. 您已经手动在的web.config 文件改变了Facebook的应用程序设置。

  2. 您已经正确安装了Facebook的开发者网站应用设置。

  1. You've manually changed the Facebook app settings in your web.config file.
  2. You've correctly setup your app settings in the Facebook developer website.

这篇关于Facebook的/ Twitter的使​​用dotnetopenauth?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆