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

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

问题描述

我几乎已经使用 (它是免费的).

  • 在 Visual Studio 中打开示例源代码解决方案.我使用的是 VS2010,但我认为还有一个 VS2008 解决方案文件.
    1. 现在,打开 OAuthClient 项目的 web.config 文件.

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

      <!-- Facebook 注册:http://developers.facebook.com/setup/-->

      <add key="facebookAppSecret" value="------------"/>

    您可以从 Facebook 上的应用程序中获取这些值.

    1. 调试/运行 OAuthClient Web 应用程序.这将启动 Cassini/Visual Studio Developer Server 的一个实例,并且应该会打开一个 Web 浏览器:

    瞧!您现在可以连接到 Facebook 进行登录.

    如果出现错误,则需要确保:

    1. 您已在 web.config 文件中手动更改 Facebook 应用设置.
    2. 您已在 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.

    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.

    Can anyone please help?

    解决方案

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

    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. Now, open up the web.config file for the OAuthClient project.

    2. Next, edit the following settings :-

      <!-- Facebook sign-up: http://developers.facebook.com/setup/ -->

      <add key="facebookAppID" value="------"/>

      <add key="facebookAppSecret" value="------------"/>

    You can get these values from your application on Facebook.

    1. Debug/Run the OAuthClient Web Application. This will start an instance of Cassini/Visual Studio Developer Server and a web browser should open:

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

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

    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.

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

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