javascript - google+ api 人的 friend

标签 javascript api google-plus

我正在尝试制作一个基于 google+ api 的网站。我刚开始研究 api,他们似乎没有像 facebook 那样提取一个人的圈子和 friend 的方法。该 api 实际上非常小,我想确保我没有遗漏任何东西。那么有没有人使用过 google+ api 并从用户的个人资料中提取好友信息。

最佳答案

有一个未记录的 API。 Google+ 进行以下调用以呈现 Google+ 页面:

in X’s circles:

https://plus.google.com/u/0/_/socialgraph/lookup/visible/?o=%5Bnull%2Cnull%2C%22GOOGLEPLUSUSERID%22%5D&rt=j

in whose circles?

https://plus.google.com/u/0/_/socialgraph/lookup/incoming/?o=%5Bnull%2Cnull%2C%22GOOGLEPLUSUSERID%22%5D&n=1000&rt=j

通过Fragment: Looking up Who’s in Whose Google+ Circles…


查看 Google+ 源代码会发现一大堆其他 URL:

var cRa = new UD("/_/socialgraph/lookup/circles/", ND, "Error loading circles"),
    dRa = new UD("/_/socialgraph/lookup/circles_changes/", ND, "Error loading circles changes");
new UD("/_/socialgraph/lookup/external_sites/", WQa, "Error loading external sites");
var eRa = new UD("/_/socialgraph/lookup/visible/", ND, "Error loading people in common"),
    fRa = new UD("/_/socialgraph/lookup/incoming/", ND, "Error loading people that have the user in public circles"),
    gRa = new UD("/_/socialgraph/lookup/followers/", ND, 'Error loading "People who\'ve added you"'),
    hRa = new UD("/_/socialgraph/lookup/ignored/", ND, "Error loading people you've ignored");
new UD("/_/socialgraph/lookup/followingcircles/", XQa, "Error loading your circles");
var iRa = new UD("/_/socialgraph/mutate/modifyfollowingcircles/", SD, "Error modifying your circles"),
    jRa = new UD("/_/socialgraph/lookup/people/", ND, "Failed lookup");
new UD("/_/socialgraph/lookup/follower/", VQa, "Error loading whether a person has added you");
var kRa = new UD("/_/socialgraph/lookup/settings/", QD, "Error loading settings"),
    lRa = new UD("/_/socialgraph/mutate/settings/", bRa, "Error storing settings"),
    mRa = new UD("/_/socialgraph/lookup/find_more_people/", ID, 'Error loading "Find people"'),
    nRa = new UD("/_/socialgraph/lookup/close_friend_suggestions/", ID, "Error loading close friend suggestions"),
    oRa = new UD("/_/socialgraph/lookup/check_imports/", PQa, "Error loading newly imported people"),
    pRa = new UD("/_/socialgraph/get/circlenamesuggestions/", JD, "Error fetching suggested circle names");
new UD("/_/socialgraph/get/num_invites_remaining/", TQa, "Failed to get number of invites remaining");
var qRa = new UD("/_/socialgraph/get/invite_token/", SQa, "Failed to get invite token"),
    rRa = new UD("/_/socialgraph/get/inviters/", RQa, ""),
    sRa = new UD("/_/socialgraph/mutate/create/", QQa, "Error creating circle"),
    tRa = new UD("/_/socialgraph/mutate/modifymemberships/", HD, "Error changing circle memberships."),
    uRa = new UD("/_/socialgraph/mutate/removemember/", TD, "Error removing members from circle"),
    vRa = new UD("/_/socialgraph/mutate/revert/", aRa, "Error occured while trying to undo your last action"),
    wRa = new UD("/_/socialgraph/mutate/properties/", RD, "Error changing circle properties"),
    xRa = new UD("/_/socialgraph/mutate/sortorder/", YQa, "Error reordering circles"),
    yRa = new UD("/_/socialgraph/mutate/delete/", KD, "Error deleting circle"),
    zRa = new UD("/_/socialgraph/mutate/deletemem/", LD, "Error deleting people"),
    ARa = new UD("/_/socialgraph/mutate/block_user/", GD, "Error blocking user"),
    BRa = new UD("/_/socialgraph/mutate/block_user/", GD, "Error unblocking user"),
    CRa = new UD("/_/socialgraph/mutate/block_user/", GD, "Error reporting and blocking user"),
    DRa = new UD("/_/socialgraph/mutate/removefromcontacts/", ZQa, "Error removing people from contacts");
new UD("/_/socialgraph/lookup/circlepicker/", MD, "Error loading circles data");
var ERa = new UD("/_/socialgraph/lookup/hovercards/", PD, "Error loading hovercard data"),
    FRa = new UD("/_/socialgraph/lookup/peopleincommon/", ND, "Error loading people in common"),
    GRa = new UD("/_/socialgraph/notification/invite/", UQa, "Error inviting members"),
    HRa = new UD("/_/socialgraph/mutate/block_user/", GD, "Error ignoring members"),
    IRa = new UD("/_/socialgraph/mutate/block_user/", GD, "Error unignoring members");

关于javascript - google+ api 人的 friend ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7683115/

相关文章:

node.js - 如何防止在 Express 的 REST api 调用中使用冲突的关键字

javascript - 如何使用 philips hue API 创建 "scenes"

ruby - 网站不再需要本地数据库了吗?

javascript - "Uncaught TypeError: Cannot read property ' 人 ' of undefined "

java - 如何从 GoogleSignInAccount 获取性别(以前的方法现已弃用)

javascript - 为什么 JavaScript 会自动转换一些数值

javascript - 产生每次都不同的随机数

javascript - 如何使用 Mongoose 只更新 MongoDB 中的一个属性?

javascript - 如何在 xpi 中提供 firefox 插件 UUID?

java - 无法从 Google Plus 访问用户的个人资料