如何导入实时/ Hotmail联系人? [英] How to import live/hotmail contacts?

查看:75
本文介绍了如何导入实时/ Hotmail联系人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#在asp.net中创建一个网站。而我正在尝试导入 我的网站上的hotmail联系人,即www.pinny.com,我已经注册了客户ID和密钥。我使用了你的样本中给出的代码

 

private async void btnReadContact_Click(< span style ="color:Blue"> object sender,RoutedEventArgs e)
{
try
{
LiveConnectClient liveClient = new LiveConnectClient( this .session);
LiveOperationResult operationResult =
await liveClient.GetAsync(" contact.b4466224b2ca42798c3d4ea90c75aa56" );
dynamic result = operationResult.Result;
.infoTextBlock.Text = " Contact:" + result.name;
}
catch (LiveConnectException异常)
{
this .infoTextBlock.Text = "获取联系信息时出错:" + exception.Message;
}
}

但我在代码中遇到问题,即(this.session)并且等待给我错误。

为此,我使用了以下命名空间

使用Microsoft.live;

使用Microsoft.Live.Controls;

我也引用了以下链接

http://import-contacts.blogspot.in/2011/11/import-contacts-from-gmail-yahoo .html

我认为它已经过时了。请帮助我。

提前致谢




Bharat Bhushan

解决方案

您拥有的链接是委托身份验证,已被弃用了一段时间。 您应该查看Live Connect的特定于Web的入门信息:


http://msdn.microsoft.com/en-us/library/live/hh826547.aspx


I am creating a website in asp.net with C#. And i am trying to import  the hotmail contacts in my website i.e www.pinny.com and i have registered client id and secret key .I have used your code given in your samples

privateasyncvoid btnReadContact_Click(object sender, RoutedEventArgs e) { try { LiveConnectClient liveClient = new LiveConnectClient(this.session); LiveOperationResult operationResult = await liveClient.GetAsync("contact.b4466224b2ca42798c3d4ea90c75aa56"); dynamic result = operationResult.Result; this.infoTextBlock.Text = "Contact: " + result.name; } catch (LiveConnectException exception) { this.infoTextBlock.Text = "Error getting contact info: " + exception.Message; } }

but i am getting problem in code i.e (this.session) and await is giving me the error.

For this i have used the following namespaces

Using Microsoft.live;

using Microsoft.Live.Controls;

Also i have referenced the below link

http://import-contacts.blogspot.in/2011/11/import-contacts-from-gmail-yahoo.html

i think so it is obsolete.so please help me .

Thanks in advance


Bharat Bhushan

解决方案

The link you have is for Delegated Authentication, which has been deprecated for some time.  You should take a look at the Web-specific Getting Started information for Live Connect instead:

http://msdn.microsoft.com/en-us/library/live/hh826547.aspx


这篇关于如何导入实时/ Hotmail联系人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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