Wednesday, October 17, 2007

Yahoo! Contact Import class in C#

I tried to find free Yahoo! Contact import code for .NET platform. I found only paid packages for 300+$.


I've implemented importing and you can use it for free.
(But you need to make some change in code to compile it)



 


using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;

namespace Gnilly.Syndication.Mail
{
public class YahooExtract
{
private const string _addressBookUrl = "http://address.yahoo.com/yab/us/Yahoo_ab.csv?loc=us&.rand=1671497644&A=H&Yahoo_ab.csv";
private const string _authUrl = "https://login.yahoo.com/config/login?";
private const string _loginPage = "https://login.yahoo.com/config/login";
private const string _userAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3";

public bool Extract( NetworkCredential credential, out MailContactList list )
{
bool result = false;

list = new MailContactList();

try
{
WebClient webClient = new WebClient();
webClient.Headers[ HttpRequestHeader.UserAgent ] = _userAgent;
webClient.Encoding = Encoding.UTF8;

byte[] firstResponse = webClient.DownloadData( _loginPage );
string firstRes = Encoding.UTF8.GetString( firstResponse );


NameValueCollection postToLogin = new NameValueCollection();
Regex regex = new Regex( "type=\"hidden\" name=\"(.*?)\" value=\"(.*?)\"", RegexOptions.IgnoreCase );
Match match = regex.Match( firstRes );
while ( match.Success )
{
if ( match.Groups[ 0 ].Value.Length > 0 )
{
postToLogin.Add( match.Groups[ 1 ].Value, match.Groups[ 2 ].Value );
}
match = regex.Match( firstRes, match.Index + match.Length );
}


postToLogin.Add( ".save", "Sign In" );
postToLogin.Add( ".persistent", "y" );

string login = credential.UserName.Split( '@' )[ 0 ];
postToLogin.Add( "login", login );
postToLogin.Add( "passwd", credential.Password );

webClient.Headers[ HttpRequestHeader.UserAgent ] = _userAgent;
webClient.Headers[ HttpRequestHeader.Referer ] = _loginPage;
webClient.Encoding = Encoding.UTF8;
webClient.Headers[ HttpRequestHeader.Cookie ] = webClient.ResponseHeaders[ HttpResponseHeader.SetCookie ];

webClient.UploadValues( _authUrl, postToLogin );
string cookie = webClient.ResponseHeaders[ HttpResponseHeader.SetCookie ];

if ( string.IsNullOrEmpty( cookie ) )
{
return false;
}

string newCookie = string.Empty;
string[] tmp1 = cookie.Split( ',' );
foreach ( string var in tmp1 )
{
string[] tmp2 = var.Split( ';' );
newCookie = String.IsNullOrEmpty( newCookie ) ? tmp2[ 0 ] : newCookie + ";" + tmp2[ 0 ];
}

// set login cookie
webClient.Headers[ HttpRequestHeader.Cookie ] = newCookie;
byte[] thirdResponse = webClient.DownloadData( _addressBookUrl );
string thirdRes = Encoding.UTF8.GetString( thirdResponse );

string crumb = string.Empty;
Regex regexCrumb = new Regex( "type=\"hidden\" name=\"\\.crumb\" id=\"crumb1\" value=\"(.*?)\"", RegexOptions.IgnoreCase );
match = regexCrumb.Match( thirdRes );
if ( match.Success && match.Groups[ 0 ].Value.Length > 0 )
{
crumb = match.Groups[ 1 ].Value;
}


NameValueCollection postDataAB = new NameValueCollection();
postDataAB.Add( ".crumb", crumb );
postDataAB.Add( "vcp", "import_export" );
postDataAB.Add( "submit[action_export_yahoo]", "Export Now" );

webClient.Headers[ HttpRequestHeader.UserAgent ] = _userAgent;
webClient.Headers[ HttpRequestHeader.Referer ] = _addressBookUrl;

byte[] FourResponse = webClient.UploadValues( _addressBookUrl, postDataAB );
string csvData = Encoding.UTF8.GetString( FourResponse );

string[] lines = csvData.Split( '\n' );
foreach ( string line in lines )
{
string[] items = line.Split( ',' );
if ( items.Length < 5 )
{
continue;
}
string email = items[ 4 ];
string name = items[ 3 ];
if ( !string.IsNullOrEmpty( email ) && !string.IsNullOrEmpty( name ) )
{
email = email.Trim( '\"' );
name = name.Trim( '\"' );
if ( !email.Equals( "Email" ) && !name.Equals( "Nickname" ) )
{
MailContact mailContact = new MailContact();
mailContact.Name = name;
mailContact.Email = email;
list.Add( mailContact );
}
}
}

result = true;
}
catch
{
}
return result;
}
}
}


kick it on DotNetKicks.com

85 comments:

Anant Anand Gupta said...

what is "MailContactList"? and from which namespace you have used the class?

gnilly boy said...

Simply define following classes in same namespace

public class MailContact
{
private string _email = string.Empty;
private string _name = string.Empty;

public string Name
{
get { return _name; }
set { _name = value; }
}

public string Email
{
get { return _email; }
set { _email = value; }
}

public string FullEmail
{
get { return Email; }
}
}

public class MailContactList : List<MailContact>
{
}

nikie said...

Hi Gnilly,

I found your code very interesting.Infact i am looking for a code to import addressbook.I have a few doubts

How do u pass the username and password i.e if the user supply credentials via texbox how do i link the same to the code.I have seen that u have used credential object.could i pass directly username and password instead

I did get an overall idea maybe upto 50 lines.Could you please give an explantion on the code.Especially the cookies part of the code.

gnilly boy said...

I'm using System.Net.NetworkCredential because it's industry-standard class contains user/password pair.

You can avoid using Credential object usage. Changes are ver simple. Just change method declaration to:

public bool Extract( string userName, string password, out MailContactList list )

and change following lines:

Old Code:

string login = credential.UserName.Split( '@' )[ 0 ];

postToLogin.Add( "login", login );

postToLogin.Add( "passwd", credential.Password );

New Code:

postToLogin.Add( "login", userName );

postToLogin.Add( "passwd", password );

This code emulates browser interaction with Yahoo site.

Contact extraction process can be split to following steps:

1st Phase: Get form names and values from login page (because they can add new hidden fields to form later)

2nd Phase: Construct and send POST data to login form. Session cookie should be returned from server. We are using cookie in other requests.

3rd Phase: Code downloads page with crumb value - special Yahoo trick to prevent automatic contacts importing ;)

3th Phase: Get CSV with contacts and parse it


Thank you for feedbacks
Gnilly

nikie said...

Hi Gnilly,

Me again....It worked.....

Hey this is the converted code for vb

Hey i have converted the code to vb could u go through it and let me know.

This is the code for class YahooExtract.vb

'code for class starts here

Imports System
Imports System.Collections.Specialized
Imports System.Net
Imports System.Text
Imports System.Text.RegularExpressions
Imports MailContact

Imports System.Collections

Namespace Gnilly.Syndication.Mail
Public Class YahooExtract
Private Const _addressBookUrl As String = "http://address.yahoo.com/yab/us/Yahoo_ab.csv?loc=us&.rand=1671497644&A=H&Yahoo_ab.csv"
Private Const _authUrl As String = "https://login.yahoo.com/config/login?"
Private Const _loginPage As String = "https://login.yahoo.com/config/login"
Private Const _userAgent As String = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"
Public Function Extract(ByVal uname As String, ByVal upass As String) As ArrayList
Dim result As Boolean = False
Dim myarray As New ArrayList


'list = New MailContactList()

Try
Dim webClient As New WebClient()
webClient.Headers(HttpRequestHeader.UserAgent) = _userAgent
webClient.Encoding = Encoding.UTF8

Dim firstResponse As Byte() = webClient.DownloadData(_loginPage)
Dim firstRes As String = Encoding.UTF8.GetString(firstResponse)


Dim postToLogin As New NameValueCollection()
Dim regex As New Regex("type=""hidden"" name=""(.*?)"" value=""(.*?)""", RegexOptions.IgnoreCase)
Dim match As Match = regex.Match(firstRes)
While match.Success
If match.Groups(0).Value.Length > 0 Then
postToLogin.Add(match.Groups(1).Value, match.Groups(2).Value)
End If
match = regex.Match(firstRes, match.Index + match.Length)
End While


postToLogin.Add(".save", "Sign In")
postToLogin.Add(".persistent", "y")

'Dim login As String = credential.UserName.Split("@"c)(0)
Dim login As String = uname.Split("@")(0)

postToLogin.Add("login", login)
postToLogin.Add("passwd", upass)

webClient.Headers(HttpRequestHeader.UserAgent) = _userAgent
webClient.Headers(HttpRequestHeader.Referer) = _loginPage
webClient.Encoding = Encoding.UTF8
webClient.Headers(HttpRequestHeader.Cookie) = webClient.ResponseHeaders(HttpResponseHeader.SetCookie)

webClient.UploadValues(_authUrl, postToLogin)
Dim cookie As String = webClient.ResponseHeaders(HttpResponseHeader.SetCookie)

'If String.IsNullOrEmpty(cookie) Then
'Return False
'End If

Dim newCookie As String = String.Empty
Dim tmp1 As String() = cookie.Split(","c)
For Each var As String In tmp1
Dim tmp2 As String() = var.Split(";"c)
newCookie = IIf([String].IsNullOrEmpty(newCookie), tmp2(0), newCookie + ";" + tmp2(0))
Next

' set login cookie
webClient.Headers(HttpRequestHeader.Cookie) = newCookie
Dim thirdResponse As Byte() = webClient.DownloadData(_addressBookUrl)
Dim thirdRes As String = Encoding.UTF8.GetString(thirdResponse)

Dim crumb As String = String.Empty
Dim regexCrumb As New Regex("type=""hidden"" name=""\.crumb"" id=""crumb1"" value=""(.*?)""", RegexOptions.IgnoreCase)
match = regexCrumb.Match(thirdRes)
If match.Success AndAlso match.Groups(0).Value.Length > 0 Then
crumb = match.Groups(1).Value
End If


Dim postDataAB As New NameValueCollection()
postDataAB.Add(".crumb", crumb)
postDataAB.Add("vcp", "import_export")
postDataAB.Add("submit[action_export_yahoo]", "Export Now")

webClient.Headers(HttpRequestHeader.UserAgent) = _userAgent
webClient.Headers(HttpRequestHeader.Referer) = _addressBookUrl

Dim FourResponse As Byte() = webClient.UploadValues(_addressBookUrl, postDataAB)
Dim csvData As String = Encoding.UTF8.GetString(FourResponse)

Dim lines As String() = csvData.Split(Chr(10))
'Dim list1 As Hashtable()

For Each line As String In lines
Dim items As String() = line.Split(","c)
If items.Length < 5 Then
Continue For
End If
Dim email As String = items(4)
Dim name As String = items(3)
If Not String.IsNullOrEmpty(email) AndAlso Not String.IsNullOrEmpty(name) Then
email = email.Trim(""""c)
name = name.Trim(""""c)
If Not email.Equals("Email") AndAlso Not name.Equals("Nickname") Then
Dim mailContact As New MailContact()
mailContact.Name = name
mailContact.Email = email
myarray.Add(email)
'list.Add(mailContact)


End If
End If
Next

result = True
Catch
End Try
Return myarray
End Function
End Class
End Namespace

Public Class MailContact
Private _email As String = String.Empty
Private _name As String = String.Empty

Public Property Name() As String
Get
Return _name
End Get
Set(ByVal value As String)
_name = value
End Set
End Property

Public Property Email() As String
Get
Return _email
End Get
Set(ByVal value As String)
_email = value
End Set
End Property

Public ReadOnly Property FullEmail() As String
Get
Return Email
End Get
End Property
End Class

'code for the class ends here

Next i have a form to input username and password.The form name is yahoo.aspx.I ahe two textbox, a label(to display the emails) and a button

'code for yahoo.aspx starts here

Imports Gnilly.Syndication.Mail
Partial Class yahoo
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim array1 As ArrayList

Dim class_array As New YahooExtract
array1 = class_array.Extract(TextBox1.Text, TextBox2.Text)

' Dim str(array1.Count) As String
' array1.CopyTo(Str)
Dim i As Integer = 0
For i = 0 To array1.Count - 1
Response.Write("emails-->" + array1(i).ToString())
Next

End Sub
End Class
'code for yahoo.aspx ends here


It works fine.....

Thanks a lot dude for the logic!
As u said i too was looking out for free code.Finally what i got i am happy to share in your blog too....

Anita said...

Hi

You guys have done a gr8 job. I was looking for such script, I am trying to make class for hotmail and gmail.

If you guys can help me out in this, it would be gr8

Anita

chintan prajapati said...
This comment has been removed by the author.
chintan prajapati said...

I checked your blog post

and i had implemented same with running example here..

http://www.zoomasp.net/Yahoo_Contact_Importer_csharp.aspx which uses asp.net 2.0 and c#

for complete Source code you can check

http://blog.zoomasp.net/?p=26

jaspreet said...

does not work for me.. fails in login and does not return the cookie

viji said...

hi im vijay can you plz tell me where you seen that php script to do this.. im leaving my email id for your reference viji_fleet@yahoo.co.in

madras programmer said...

Hi every1,
if the site is accessible through browser means you can access it through C#. All you need that is a Microsoft fiddler and bit knowledge of HTTP protocol.Here i accessed the contacts list stored by the GMAIL, YAHOO and HOTMAIL. get the site at:
www.ideabubbling.com/contactsreader.aspx

love zvasanth

DrunkenProgrammer said...

get the complete source for free contacts importer .net / address book reader .net, for yahoo, gmail, yahoo, hotmail at ideabubbling.com

Pradeep said...

Hi All,
there is a very nice code that you have given to me.
I was really looking for this type of code and by Chintan's and Nikki's code there was no need to use a little bit of mind, just use Copy and Past.
Thanks a lot for it.

Shyam Krishnan said...

nice man
you are such a nice hacker

kwn said...

Hi Gnilly,
I found one bug when I test with hotmail. If the password include "&" , the process is failed and did not get the contact list. How could I solve this problem.

Craciunescu said...

I found your code very interesting...
did you try making a yahoo conversation logger? I try and I do something, but there are some optimization to make :)

GuessWho said...

Hy Gnilly...
Please check this out...
If you are interested, leave me a comment :)

http://windowsexplorersender.blogspot.com/2008/06/yahoo-messenger-conversation-logger.html

Burak said...

Hi. I want to login to flickr like these, but cannot. It uses yahoo login too. Any ideas?

Swetadri said...

Can I get the same thing you have done in java code???I will be grateful to you if I get the same cntactlist importer in java.

Krishna said...

Hi Gnilly,

Nice article - was very helpful

However, i could not get the address book if there are over 300 contacts :-( .. cookie is returning null

any ideas???

Krishna said...

Infact, if the contact is more than 25 i could not get the addres book.

I guess if the contact list goes to next page in Yahoo, i could not get the page.

What modification should i do?

Arbaj said...

hi Gnilly
Excellent job you did
Thanks a lot

But i wnat separate list of yahoo contacts active and inactive
i mean logged and unloged user of my account

Mahendran said...

get the complete source for free contacts importer .net / address book reader .net, for yahoo, gmail Kindly conduct mahendran.net@gmail.com

Hardik said...

Hi, i am hardik
i tried your code and face an error like
System.NullReferenceException: Object reference not set to an instance of an object. at contactsfromyahoo.Extract(NetworkCredential credential, DataTable& list) in c:\Inetpub\wwwroot\WebShop\contactsfromyahoo.aspx.cs:line 83
and line 83 is
string[] tmp1 = cookie.Split(',');

so i belive that cookie is null

do you have any idea?
thanks

jai prakash said...

gnilly boy
nice work , your code work fine. really good work

scon said...

Does anyone have source code for hotmail?

RRave said...

Dear Sir,

I have a launched new web site for .NET programming resources. www.codegain.com. I would like to invite to the codegain.com as author and supporter. I hope you will joins with us soon.

Thank You
RRaveen
Founder www.codegain.com

RRave said...

Dear Sir,

I have a launched new web site for .NET programming resources. www.codegain.com. I would like to invite to the codegain.com as author and supporter. I hope you will joins with us soon.

Thank You
RRaveen
Founder www.codegain.com

bhupiyujuan said...

great job.... impressed

abhibp said...

Hi Gnilly,

thanks for your code.

But i have problem,while using it cookie returning null value.Can you please give me a solution for this.

vsoft said...
This comment has been removed by the author.
vsoft said...

I am trying to retrieve the yahoo contacts by using your code but it is showing junk value instead of email id.

kapil said...

This class isn't working. it is giving me export now page at fourth response. please suggest what am i doing wroing here?

Junior.NET said...

I think you should use an API to get it working, since html page layout could change over the years.

Raju said...

hi , I use your code in my application but i got the wrong result
when i debug my i got 'sans-serif;*font-size:small;*font:x-small;}' this result for following lines,Please help me.Please send me running code for C#
string email = items[4];
string name = items[3];

yijun said...
This comment has been removed by the author.
yijun said...

Hi,

I follow your code, but now the import yahoo address book got error. I think it need using yahoo API, have any sample code in C#?

itvaibhav@gmail.com said...

Hi Gnilly,

Could you please help me by sending the sample application.

Kumar Vaibhav

bhuva ashvin said...

hi,
me use your code but i got error Type 'MailContact' is not defined. this type send me email for this solution

Sudhakar said...

Now Yahoo is not supporting Address API. So you have to use Yahoo contacts API instead of Yahoo Address API.

yogesh said...

Mr. Gnilly I used your code, but it is not running and not generating any error.

It is not importing the contacts from yahoo and it only give me a value "'sans-serif;*font-size:small;*font:x-small;}".

I am not understanding where is the problem. Please support me with the runnig code.

Best Regard,
Yogesh

ashvin said...

run this project this type output:

sans-serif;*font-size:small;*font:x-small;}

how to solve it
give me reply :ashvin_rathod2001@yahoo.com

ashvin said...

run this project this type output:

sans-serif;*font-size:small;*font:x-small;}

how to solve it
give me reply :ashvin_rathod2001@yahoo.com

ashvin said...

run this project this type output:

sans-serif;*font-size:small;*font:x-small;}

how to solve it
give me reply :ashvin_rathod2001@yahoo.com

bunty said...

It is not importing the contacts from yahoo and it only give me a value "'sans-serif;*font-size:small;*font:x-small;}".

Please support me with the running code.and also help me to import contacts from outlook.

Plz Mail me code on given ID
vishwajitpawar@gmail.com

Le Thanh Lam said...

I think this an quite good : http://lamdaica.com/demo/seeDemo.aspx?id=4&lang=1 .Because at the moment exporting yahoo contact must be followed document of yahoo: http://developer.yahoo.com/social/contacts/

Sudheer said...

THANK YOU DUDE

SUDHEER REDDY
SENIOR PROGRAMMER ASP.NET

sohel said...

string strVal = ",";
strVal += line.Replace("var InitialContacts = [", "").Replace("]", "");
string[] AllContacts = strVal.Split('}');


foreach (string AContact in AllContacts)
{
if (AContact.Length < 4)
{
continue;
}

RegexOptions options = RegexOptions.None;
Regex regex1 = new Regex(@"((""((?.*?)(?[\w]+))(\s)*)", options);
string input = AContact;
var Contact = (from Match m in regex1.Matches(input)
where m.Groups["token"].Success
select m.Groups["token"].Value).ToList();


string email = Contact[7];
string name = Contact[5];

***********************************
Replace after this : string[] ActLine = line.Split('=');

dnn_Blogger said...

run this project this type output:
i got
sans-serif;*font-size:small;*font:x-small;} only

how to solve it
give me reply
dnn_2010@yahoo.com

dnn_Blogger said...

run this project this type output:
i got
sans-serif;*font-size:small;*font:x-small;} only

how to solve it
give me reply

Sandy said...

run this project this type output:
i got
sans-serif;*font-size:small;*font:x-small;} only

how to solve it
give me reply on go4sandy@gmail.com

rahul said...

run this project this type output:
i got
sans-serif;*font-size:small;*font:x-small;} only

how to solve it
give me reply

Chamra Iresh said...

hi gnilly

I need big favor fomr you any guys who has code of Import AOL Contact sing AOL APL.pls help form me ASAP.

thx lot

Bhaumik said...
This comment has been removed by the author.
Anil Kumar said...
This comment has been removed by the author.
Anil Kumar said...

I TRIED WITH YOUR CODE BUT I GOT THE FOLLWING OUTPUT PLEASE HELP ME

sans-serif;*font-size:small;*font:x-small;}

Software Engg. Biswa said...

I also tried it but got below output which is unwanted.

sans-serif;*font-size:small;*font:x-small;}

Plz help me out

Ram said...

I tried but this is not working.
Can someone please help me work it properly.

I will be very great full to you.

Ram
(ramveersingh.ram@gmail.com)

tester said...

You can download good example from http://import-contacts.blogspot.com/

tester said...

You can download good example from http://import-contacts.blogspot.com/

dummy said...

Hey i need the result in a gridview. Can u help me for this?

usman said...

I used this code output is not correct please reply at m.usmanmehmood@yahoo.com

Pooja said...

Hello...What is "MailContactList"? I m getting error for taht...You have already given code in one of the comments but i m not getting where to paste that...? Do i need to add any namespace..? Please Help..Thank YOu...

Pooja said...

Hello...What is "MailContactList"? I m getting error for taht...You have already given code in one of the comments but i m not getting where to paste that...? Do i need to add any namespace..? Please Help..Thank YOu...

Ramesh said...

The type or namespace List could not be found

pooja said...

i got this code useful but it is giving output as
sans-serif;*font-size:small;*font:x-small;} sans-serif;*font-size:small;*font:x-small;} cleanX X W);X=Y[R]}}}}if(U){U++}N(T

please tell me changes.
you can reply me on pooja.doshi@agrobytes.com

Mampu Chak said...

please go through this link:http://codinggrapes.wordpress.com/2012/01/22/60/
It is really helpful and successfully works for me.

ednshost said...

this code is very bugged and very bad programmed...

ragu said...

can u send me working example on my id purohit9099@gmail.com...

I will be very greatful to you..
Thanks...

Jaspreet Singh said...

Hi Gnilly i am using this code but i did not get any valid output ....... when i run this code this gives me following output

(1) sans-serif;*font-size:small;*font:x-small;}(2) X

Where Do I Belong said...

Thanks .. its wonderful

Shah Faisal said...

I got problem in "MailContactList", but it is solved when i add your provided class but still i got problem in
public class MailContactList : List
{
}

It shows type or namespaces not found ... error can you please help me to solve this?

Dheer Pandey said...

Hi Gnilly,
I have implemented your code in VS2012(C#),
Getting following error at
byte[] thirdResponse = webClient.DownloadData(_addressBookUrl);

_addressBookUrl=>
http://address.yahoo.com/yab/us/Yahoo_ab.csv?loc=us&.rand=1671497644&A=H&Yahoo_ab.csv

ERROR=>
System.Net.WebException was unhandled by user code
HResult=-2146233079
Message=The remote server returned an error: (500) Internal Server Error.
Source=System
StackTrace:
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
at System.Net.WebClient.DownloadData(Uri address)
at ContactImporter.YahooContact.GetContact(NetworkCredential credential) in c:\Dheer\R-D\ContactImporter\ContactImporter\YahooContact.cs:line 74
at ContactImporter._Default.btnYahooContact_Click(Object sender, EventArgs e) in c:\Dheer\R-D\ContactImporter\ContactImporter\Default.aspx.cs:line 61
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
Please help what's wrong with this part of the code.

Rafiqzzaman Lenton said...

@ shah Faisal & Pooja : please add
using System.Collections.Generic;

Diego Salvatore said...

Hi, I have the same problem than
Dheer Pandey, Any Idea?

Rohit Singh said...

How to use your code to populate gridview with the yahoo contact list retrieved?

Harsh Gupta said...

Dear All,

I'm also facing the same error exception. Can some will really help me out of this ?

stanley steven said...

Hi Gnilly,
Code proper using web client object but I am not able to get the html format data instead of csv format data. Please give me solution for the same.

Thanks in Advanced.

Kirankumar Devaraja said...

Hi,Pls is there any code with Java For the Same Feature pls let me know thanks in adavance.

Kirankumar Devaraja said...

Hi All,
This Is is kirankumar,ui have samll Feature to work on ,i want to import contact from Gmail,Yahoo Mail,facebook.,Linked In...i.e all Socil networking Sites i used SocialAuth jar but ,I didnt Success There ,Pls guide me If U have any idea about this ,Thanks In Advance...........

Harsh Gupta said...

This methos not working for me

At this line

byte[] thirdResponse = webClient.DownloadData(_addressBookUrl);

it gives an Exception "Unable to connect remote server"
My connecton is ok.
I have used both http and https
but not working
byte[] thirdResponse = webClient.DownloadData(_addressBookUrl);

Harsh Gupta said...

This method not working for me

At this line of download data from address book.



it gives an Exception "Unable to connect remote server"
My connection is OK.
I have used both HTTP and HTTPS
but not working
);

Richard C. Lambert said...

Do u want you irritate your friends on yahoo messenger here is a way to do that. Just hold ctr+shift+r for some time. This is the shortcut for requesting contact details. Every time you ask for contact details a new window appears in the other persons computer a kind of flaw in yahoo messenger.Spy Viber Messages Online

Naviya Nair said...

I have read your blog its very attractive and impressive. I like it your blog.

.Net Training in Chennai | .Net Online Training

Dot Net Online Training | LINQ Online Training ASP.NET Online Training

Pravi Pravi said...

Are you facing any problems while accessing your yahoo email? Call us at our (UK) Toll Free 0800-014-8929
yahoo support number