import contacts from gmail/hotmail/yahoo to php

大城市里の小女人 提交于 2019-12-07 14:42:32

问题


i would like to import contacts from gmail/hotmail/yahoo to my php applications just like those found in social network.

i've read how gmail does it but im still not very clear about it. it says i would need to do a http request like this https://www-opensocial.googleusercontent.com/api/people/@me/@self

but how should i send this info?? i tried running this on the browser and it returns "Cannot make anonymous request without explicit user ID in the URL" so how can i pass the correct user ID then??

for yahoo, the Yahoo! Address Book API is deprecated and now we should use Contacts API. have anyone use this b4??


回答1:


It looks like that URL corresponds to osapi.people, which suggests that you can replace the token @me with a profile name.

I verified this by visiting that URL and replacing the @me with my own Google login.

The JSON-RPC documentation suggests that you can replace the @self token with @friends to get a friend list, assuming the application making the request is authorized to pull down this data.

Unfortunately this is all I know, discovered through a few minutes in Google finding the docs.




回答2:


import user contacts form google, yahoo, and AOL in php check here. It explains how one can register for OAuth 2.0 and download contacts from google



来源:https://stackoverflow.com/questions/5211868/import-contacts-from-gmail-hotmail-yahoo-to-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!