Google plus 如何在google plus wall中自动共享某些信息

Google plus 如何在google plus wall中自动共享某些信息,google-plus,google-plus-one,google-search-api,google-login,Google Plus,Google Plus One,Google Search Api,Google Login,我用Google+Signin开发了一个web应用程序。一旦用户单击Google+登录,它将授权应用程序并注册该用户。在这个过程之后,我想在google plus wall中自动分享我的应用程序中的一些信息。为此,我使用了Google plus API,并启用了与登录、获取用户信息和写访问相关的API。我正在尝试使用谷歌的API在当前登录用户的流/墙/任何东西上发布。我的网站使用Facebook和twitter API在当前登录用户的墙上自动发布通知,但无法在谷歌的墙上发布。我想要像Facebo

我用Google+Signin开发了一个web应用程序。一旦用户单击Google+登录,它将授权应用程序并注册该用户。在这个过程之后,我想在google plus wall中自动分享我的应用程序中的一些信息。为此,我使用了Google plus API,并启用了与登录、获取用户信息和写访问相关的API。我正在尝试使用谷歌的API在当前登录用户的流/墙/任何东西上发布。我的网站使用Facebook和twitter API在当前登录用户的墙上自动发布通知,但无法在谷歌的墙上发布。我想要像Facebook和Twitter的API,自动发布功能和API的东西。 请帮我解决这个问题。 为了便于您审阅,我将我的示例代码片段发送到这里:

/*
<script type="text/javascript">
    function googleAPIOnLoad() {
        console.log("Google plus js loaded... calling client.load...");
        gapi.client.load('plus','v1', function(e){
            console.log("client loaded...");
            console.log(e);                
        });
    }

    function signIn() {
        console.log("signing in...");
        gapi.auth.authorize({
            client_id: "XXXXXXXXXXX",
            immediate: false,
            response_type: "token",
            scope: ["https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.stream.write"],
            requestvisibleactions: "https://schemas.google.com/AddActivity"
        }, function(e) {
            // callback
            console.log("done!", e);

            gapi.client.request({
                path: "plus/v1/people/me/moments/vault",
                method: "POST",
                body: JSON.stringify({
                    type: "http://schemas.google.com/AddActivity",
                    target: {
                        type: "http://schema.org/Thing",
                        name: "Test Name",
                        description: "Test Description",
                        image: "http://test.test.com/Deal/Dealphoto/Thumbnail/0160475582922191382013.png"
                    }
                })
            }).execute(function(e) {
                console.log("did it.", e);
            });
        });
    }
</script>

*/
/*
函数googleAPIOnLoad(){
log(“GoogleplusJSLoaded…调用client.load…”);
gapi.client.load('plus','v1',函数(e){
log(“客户端加载…”);
控制台日志(e);
});
}
函数签名(){
console.log(“登录…”);
gapi.auth.authorize({
客户id:“XXXXXXXXXX”,
即时:错,
响应类型:“令牌”,
范围:[”https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.stream.write"],
请求访问操作:“https://schemas.google.com/AddActivity"
},功能(e){
//回拨
log(“完成!”,e);
gapi.client.request({
路径:“plus/v1/people/me/moments/vault”,
方法:“张贴”,
正文:JSON.stringify({
类型:“http://schemas.google.com/AddActivity",
目标:{
类型:“http://schema.org/Thing",
名称:“测试名称”,
描述:“测试描述”,
图像:“http://test.test.com/Deal/Dealphoto/Thumbnail/0160475582922191382013.png"
}
})
}).执行(功能(e){
console.log(“做到了”,e);
});
});
}
*/
为此我将非常感谢你

谢谢,
Lalit

基本上你不能自动发布到用户Google+流。您可以对用户有意发布使用,也可以使用自动创建在用户流中不可见的发布

有一个完整的编写API方法可以启动

中有一个编写API,但它只适用于谷歌应用程序用户,并且只能在该公司发布私人内容