JS Google+检索圈子列表

时间:2014-05-28 22:13:57

标签: javascript jquery ajax google-plus

我尝试使用JavaScript请求网址在应用中为用户获取圈子列表: 我的代码是

var scopes = ['https://www.googleapis.com/auth/plus.me',
                'https://www.googleapis.com/auth/plus.login',
                'https://www.googleapis.com/auth/plus.circles.read',
                'https://www.googleapis.com/auth/plus.media.upload',
                'https://www.googleapis.com/auth/plus.profiles.read',
                'https://www.googleapis.com/auth/plus.stream.read',
                'https://www.googleapis.com/auth/plus.stream.write',
                'https://www.googleapis.com/auth/plus.circles.write',
                'https://www.googleapis.com/auth/paymentssandbox.make_payments',
                'https://www.googleapis.com/auth/userinfo.profile',
                'https://www.googleapis.com/auth/userinfo.email',
                'https://www.google.com/m8/feeds/contacts/default/full'];



function getCircles() {
    $.ajax({
        type: 'GET',
        url: 'https://www.googleapis.com/plusDomains/v1/people/me/circles?access_token=' + access_token,
        dataType: 'jsonp',
        success: function (response) {
            console.log(response);
        },
        error: function (e) {
            console.log(e);
        }
    });
}

我在我的应用中启用了权限 Google+ API Google+域名API

但检索到此请求

error
    Object { errors=[1], code=403, message="Forbidden"}

code
    403

errors
    [Object { domain="global", reason="forbidden", message="Forbidden"}]

0
    Object { domain="global", reason="forbidden", message="Forbidden"}

domain
    "global"

message
    "Forbidden"

reason
    "forbidden"

message     "Forbidden"

0 个答案:

没有答案