将联系人从 gmail/hotmail/yahoo 导入到 php
我想将联系人从 gmail/hotmail/yahoo 导入到我的 php 应用程序,就像在社交网络中找到的那样。
我已经读过 gmail 是如何做到这一点的,但我仍然不太清楚。它说我需要执行这样的http请求 https://www-opensocial.googleusercontent.com/api/people/@me/@self
但我应该如何发送此信息?我尝试在浏览器上运行它,它返回“如果 URL 中没有明确的用户 ID,则无法发出匿名请求”,那么我如何传递正确的用户 ID?
对于雅虎来说,雅虎!地址簿 API 已弃用,现在我们应该使用联系人 API。有人用过这个b4吗?
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??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来该 URL 对应于
osapi.people
,这表明您可以将令牌@me
替换为配置文件名称。我通过访问该网址并将
@me
替换为我自己的 Google 登录信息来验证这一点。JSON-RPC 文档建议您可以将
@self
令牌替换为@friends
以获取好友列表,假设发出请求的应用程序被授权提取此数据。不幸的是,这就是我所知道的全部,是通过 Google 查找文档几分钟后发现的。
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.