Import Hotmail contacts

27 views
Skip to first unread message

Daynthan Kabilan

unread,
Nov 28, 2013, 9:51:10 AM11/28/13
to rubyonra...@googlegroups.com
Hi friend,

how to import hotmail contacts in our application.

i used omnicontacts gem. my code is

controller
def contact_list
       @contacts = request.env['omnicontacts.contacts']
end


view
<%@contacts.each do |con| %>

<%= con[:email] %>
<%= con[:name] %>

<%end%>

name return correctly but email return empty.

Thanks for advance.

Dave Aronson

unread,
Nov 28, 2013, 2:51:09 PM11/28/13
to rubyonrails-talk
On Thu, Nov 28, 2013 at 9:51 AM, Daynthan Kabilan <dayan...@gmail.com> wrote:

> how to import hotmail contacts in our application.
...
> name return correctly but email return empty.

The README at https://github.com/Diego81/omnicontacts says:

===8<---cut here---

Hotmail presents a "peculiar" feature. Their API returns a Contact
object which does not contain an e-mail field! However, if the contact
has either name, family name or both set to null, than there is a
field called name which does contain the e-mail address. This means
that it may happen that an Hotmail contact does not contain the email
field.

===8<---cut here---

Also, at least as of early 2013, Hotmail didn't let you retrieve your
contacts' email addresses, UNLESS said contact was a Hotmail user too,
AND had specifically approved the app in question to see their
address. They may have loosened that up since then, but I wouldn't
count on it.

-Dave (who has contributed code to Omnicontacts)

--
Dave Aronson, the T. Rex of Codosaurus LLC (codosaur.us),
freelance software developer, and creator of these sites:
PullRequestRoulette.com, blog.codosaur.us, & Dare2XL.com.
Reply all
Reply to author
Forward
0 new messages