Import Gmail Contact Brithday and Pic in Asp.Net

I want to import the contact of gmail. I have successfully import the Name,phone and email address of the friends but I want to import the pic and DOB of friend too.

I have done lot of R&D but not found and solution. Please help …….

Answers


Check Google Contacts API

https://developers.google.com/google-apps/contacts/v3/#retrieving_a_contacts_photo

To retrieve a contact's photo, send an authorized GET request to the contact's photo link URL.

The URL is of the form:

https://www.google.com/m8/feeds/photos/media/{userEmail}/{contactId}

With the appropriate values in place of userEmail and contactID.

public static void DownloadPhoto(ContactsRequest cr, Uri contactURL)
{
  Contact contact = cr.Retrieve<Contact>(contactURL);

  Stream photoStream = cr.GetPhoto(contact);
  FileStream outStream = File.OpenWrite("test.jpg");
  byte[] buffer = new byte[photoStream.length];

  photoStream.Read(buffer, 0, photoStream.length);
  outStream.Write(buffer, 0, photoStream.length);
  photoStream.Close();
  outStream.Close();
}

Need Your Help

doctrine odm returns null for date field

php mongodb symfony doctrine-orm

I use symfony with doctrine mongodb odm. After persisting a document I got the right data in the db:

Login View controller before SWRevealViewController

ios objective-c uiviewcontroller parse-platform swrevealviewcontroller

I followed parse.com tutorials on how to implement login + register + segue to main controller if registration or login is successful. This works beautiful.