如何在Google plus墙上动态发布?

时间:2015-04-01 10:18:33

标签: php google-plus

我有使用javascript在Google plus墙上发布动态内容的代码,但我想使用PHP发布。

这是Java脚本代码:

function gRenderShare() {
    $('#share-button').show();
    var options = {
        contenturl: $('#link-url').val(),
        clientid: '*clientid*.apps.googleusercontent.com',
        cookiepolicy: 'single_host_origin',
        prefilltext: $('#prefill-text').val(),       
        recipients: (gShareRecipient ? gShareRecipient.toString() : null),
        calltoactionlabel: ($('#call-to-action').val() ? $('#call-to-action').val() : null),
        calltoactionurl: $('#target-url').val(),
        onshare: function(response){
            console.log(response);
            alert(response);
        }
    };
    // Call the render method when appropriate within your app to display the button.
    gapi.interactivepost.render('share-button', options);        
}

0 个答案:

没有答案