我有使用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);
}