开发者

Getting Yahoo contact names and email addresses using YQL

I'm trying to build a web application in which users can invite their friends by using their开发者_StackOverflow email accounts (just like facebook). I use OAuth so that users don't need to enter password in my app. The problem is that I cannot figure out what is the correct YQL query to fetch contact names and email addresses from Yahoo social tables, and achieve the same result with facebook's Find Friends feature.

At first I used this:

SELECT * FROM social.contacts(0, 500) WHERE guid=me

With this query I hope I can get all contacts of the current logged in user, at once. But after parsing and selecting only records which have email field, the result list is far less than when I'm using facebook's Find Friends. I guess facebook does not only using Contacts tables, but also Profile tables, as I see it in the Yahoo authorization page when granting access permission to my private data.

So what is the correct YQL query to get all contact names and email addresses, using these two tables ?


After trying some tests, I discovered that when I import email addresses from my Yahoo contacts, Facebook automatically guesses the contact's email address in case that contact does not have an email field, by appending @yahoo.com to its yahooid field. As I see, this is totally wrong. Because with a yahooid, say "john123", the associated email may have an international domain like john123@yahoo.co.uk, john123@yahoo.com.vn etc.

I have a friend in my Yahoo contacts list. He has a yahooid which associates with a @yahoo.com.vn email address. Before importing my Yahoo contacts into Facebook, I made sure that there is no email field in his contact entry, just a name and a yahooid field. After importing into Facebook, Facebook determines my friend's email address as a @yahoo.com email. Of course the Facebook invitation mail never reach him.

And so, the answer to my question is: there is nothing wrong with my YQL. Facebook can fetch more email addresses than I do, but many of them are incorrect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜