如何在asp.net中集成openinviter代码?
我正在使用 Asp.Net 和 C# 开发一个社交网站。所有用户都可以选择从不同的邮件导入他们的联系人,例如:- gmail、Hotmail、yahoo、reddiffmail 等< /强>... 我在 openinviter.com 中找到了一些源代码。但那是用 PHP 编码的。 我如何在我的 Asp.net 站点中使用该文件? 请帮助我一些示例代码...
如何集成它?
I am developing a Social Networking Site using Asp.Net and C#.There is an option for All users to import their contact from deferent mails eg:- gmail,Hotmail,yahoo,reddiffmail etc...
I found some source code in openinviter.com.But that is Coded in PHP.
How i use that files in my Asp.net site?
pls help me with some sample code...
How to integrate it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在寻找基于声明的身份验证。 WIF 将使您能够通过外部安全提供程序进行身份验证:
Windows Identity Foundation 简化了开发人员的用户访问< /a>
使用 Windows 身份的基于声明的身份验证基金会
You are looking for claim based authentication. WIF will enables you to do authentication with external security providers:
Windows Identity Foundation Simplifies User Access for Developers
claims based authentication using windows identity foundation
我以前在 ASP.Net 站点上使用过 openinviter,它运行得相当好 - 尽管像 facebook 这样的插件有时会崩溃 - 主要是因为 openinviter 代码主要通过 HTML 抓取技术工作。
为了将此代码集成到 ASP.Net 中,我将 PHP 应用程序托管在一个单独的 Web 应用程序中(在我的例子中是在一个单独的子域中),然后在我的主站点上的 iframe 中显示该应用程序。
要执行您所要求的操作(将详细信息导入 ASP.Net),您可以修改 openinviter PHP,以便它不显示朋友姓名,而是执行某种回发到您的 ASP.Net 站点。这将使您能够继续受益于新的和改进的 openinviter PHP 插件的发布。您需要修改的代码很容易找到 - 查看代码
foreach ($contacts as $email=>$name)
default.php > - 这是最容易获得联系人列表的地方。 (如果您想在选择后进行拦截,请查看foreach ($selected_contacts as $email=>$name)
但是,有一点警告 - 请注意,对于许多插件(例如facebook)不允许您访问私人详细信息,因此您无法直接“导入”联系人 - 相反,这些插件允许您向这些联系人发送消息(例如 facebook 邮件)。
I've used openinviter before from an ASP.Net site and it worked reasonably well - although plugins like facebook did break from time to time - mainly because the openinviter code largely works through HTML-scraping techniques.
To integrate this code within ASP.Net, I hosted the PHP application within a separate web app (in my case on a separate subdomain) and then showed that app within an iframe on my main site.
To do what you are asking - to import details into ASP.Net - you could modify the openinviter PHP so that instead of showing friend names it performs some sort of postback to your ASP.Net site. This will enable you to continue benefiting from new and improved openinviter PHP plugins as they are released. The code you would need to modify is pretty easy to find - take a look in
default.php
near to the codeforeach ($contacts as $email=>$name)
- this is where the list of contacts is most easily available. (If you want to intercept after selection take a look instead forforeach ($selected_contacts as $email=>$name)
However, one word of warning - please note that for many of the plugins (e.g. facebook) won't allow you access to the private details so you can't "import" the contacts directly - instead these plugins allow you to send messages (e.g. facebook mails) to those contacts.