- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我可以使用 google plus 登录并获取我 google plus 圈子中所有人的列表,但现在我还想获取我圈子中所有人的电子邮件地址,有没有办法做到这一点?我试过这段代码,但它不起作用。
public void onPeopleLoaded(ConnectionResult status, final PersonBuffer personBuffer,
String nextPageToken)
{
if (status.getErrorCode() == ConnectionResult.SUCCESS)
{
try
{
//Add all friends ids in an arraylist
int count = personBuffer.getCount();
//Loop through all the ids of google plus friends
for (int i = 0; i < count; i++)
{
//mListItems.add(personBuffer.get(i).getDisplayName());
//mListIds.add(personBuffer.get(i).getId());
friends_gplus_Ids += personBuffer.get(i).getId() + ",";
//Log.d("Emails", personBuffer.get(i).getOrganizations().toString());
//personBuffer.get(i).getEmails().size();
if((personBuffer.get(i).getEmails().size() > 0))
{
Log.d("Emails", personBuffer.get(i).getEmails().get(0).toString());
}
else
{
Log.d("Emails", "Null");
}
}
}
finally
{
personBuffer.close();
}
}
最佳答案
您可能需要请求 Google+ 范围和 Contacts API 范围 (https://www.google.com/m8/feeds
)。然后您需要请求用户的联系人并找到带有 Google+ profile URLs 的联系人,它看起来像:
<gContact:website href='http://www.google.com/profiles/1234567890' rel='profile'/>
然后您会查看该联系人的电子邮件地址是否也作为同级元素存在。
关于android - 如何获取Google plus圈子的邮箱地址(Google plus圈子中添加的 friend ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19114453/
新手问 我希望对 UIView 进行子类化,以便它呈现一个圆圈。 这在 iPhone 中是如何完成的? 最佳答案 在drawRect:方法中执行: - (void)drawRect:(CGRec
当我查看 GeoJson 的规范时,我看到支持圆圈: http://geopriv.dreamhosters.com/geojson/geojson-spec.html#circleExample 但
我正在尝试创建以下气泡图,其中每个气泡都有水果图像。我在控制台中没有收到错误,并且控制台正确打印水果名称,但水果图像不显示。我缺少什么。我认为这可能是说我在 for 循环内添加了 fill 属性,但我
我正在尝试为我的网站创建 3 个不同的圈子。我不想将其作为图形/图像文件插入。所以我一直在尝试使用 CSS3 来实现它,但我真的无法解决它。 它会是什么样子?我上传了一张我想要实现的图片:www.sp
我正在用 python 编写一个名为 Circle 的类。现在作为类的一部分,我想定义方法,所以我这样做了,但是当我运行程序时,它崩溃并说它们没有定义。我找不到问题所在。 class Circle()
目标: 响应式 CSS 圈子: 等半径缩放。 半径可以用百分比计算。 Radius 可以通过媒体查询进行控制。 如果解决方案是 javascript,我仍然需要模拟媒体查询触发器。我“不需要”媒体查询
我有以下代码: Test
我最近开始尝试自学 D3,我要了解进入、更新、退出范式。 下面是我尝试使用的一些进度圈的示例; http://plnkr.co/edit/OoIL8v6FemzjzoloJxtQ?p=preview
我们有一个小的 Nodejs 应用程序,通过 Mirror API 将静态卡推送到时间线中。 收到后,Google Glass 用户将与他或她的 Google+ 圈子分享该卡片。它工作得很好,我认为,
我有一项服务可以提供最近地震事件的位置信息。我想在 Angular Google Maps 中使用上述 Lat&Long 作为圆心。我该怎么做? 这些是来自 API 调用的数据: 0: --geome
我正在使用 Google Plus 集成,我必须在其中获取用户圈子。 我正在传递网址:https://www.googleapis.com/plus/v1/people/Your_User_Id/pe
我是一名优秀的程序员,十分优秀!