Google Contacts API 不显示电子邮件,也不显示最大结果
我正在使用 Google Contacts API 恢复格式化JSON,希望包含用户联系人的全部电子邮件地址。我使用此信息在我的数据库中搜索用户的朋友。
这两种结果都不会发生。
这里是名为的 URI(为了更好的可读性而被参数分隔:
http://www-opensocial.googleusercontent.com/ api/people/@me/@all/?
filterby=emails&max_results=1000
&oauth_consumer_key=XXXXXXX
&oauth_nonce=h7ZEI
&oauth_signature=6U2ywoPRFu8iJdQhjMRk%2FZlf%2FBg%3D
&oauth_signature_method=HMAC-SHA1
&oauth_timestamp=1283979209
&oauth_token=1%2Fwv9OYV4LuffVLv6OqlFJLOtTlBo5sYYQkHbZznlLrNk
&oauth_version=1.0
&orderby=starttime
这是我返回的一些截断且匿名的 JSON。
{
"startIndex": 0,
"totalResults": 615,
"entry": [
{
"id": "XXXXXXXXXXXXXXXXXXX",
"name": {
"formatted": "XXXXX XXXXXX",
"familyName": "XXXXXXX",
"givenName": "XXXXXX"
},
"displayName": "XXXXX XXXXXX"
},
],
"itemsPerPage": 20
}
如果您能想到这里出了什么问题,那就太棒了。
I'm using the Google Contacts API to get back formatted JSON, hopefully containing ALL of a user's contacts' email addresses. I use this information to search my database for the user's friends.
Neither of these results occur.
Here's the URI that's called (broken up by paramater for slightly better readability:
http://www-opensocial.googleusercontent.com/api/people/@me/@all/?
filterby=emails&max_results=1000
&oauth_consumer_key=XXXXXXX
&oauth_nonce=h7ZEI
&oauth_signature=6U2ywoPRFu8iJdQhjMRk%2FZlf%2FBg%3D
&oauth_signature_method=HMAC-SHA1
&oauth_timestamp=1283979209
&oauth_token=1%2Fwv9OYV4LuffVLv6OqlFJLOtTlBo5sYYQkHbZznlLrNk
&oauth_version=1.0
&orderby=starttime
Here's some truncated and anonymized JSON I have returned.
{
"startIndex": 0,
"totalResults": 615,
"entry": [
{
"id": "XXXXXXXXXXXXXXXXXXX",
"name": {
"formatted": "XXXXX XXXXXX",
"familyName": "XXXXXXX",
"givenName": "XXXXXX"
},
"displayName": "XXXXX XXXXXX"
},
],
"itemsPerPage": 20
}
Any thoughts on what's going wrong here would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不想这么快回答我自己的问题,但我使用了错误的初始范围。我使用的是 Google 的 Open Social feed,而不是 Google Contacts feed。
Hate to answer my own question so soon, but I was using the wrong initial scope. I was using Google's Open Social feed rather than the Google Contacts feed.