Post in Google+ stream is not showing up in user&#

2019-06-14 04:03发布

问题:

I'm trying to post in a user's Google+ stream, and I'm trying it using the google-api PHP client. Until now, I've been able of configure a test environment using the latest google-api PHP client and an example script (See 401 Unauthorized access when posting Google+ Moments with PHP Client for more information). It looks like it posts, because it returns an array with the answer, but nothing shows up in the user stream.

The answer array is:

Array ( 
    [kind] => plus#moment 
    [type] => http://schemas.google.com/AddActivity 
    [target] => Array ( 
        [kind] => plus#itemScope 
        [url] => https://developers.google.com/+/plugins/snippet/examples/thing 
    ) 
    [result] => Array ( 
        [kind] => plus#itemScope 
    ) 
    [id] => xxxxxxxxx 
) 

which looks correct. Does anyone know why this is happens and how to solve it? Thank you!

回答1:

App activities do not render in the user's stream but instead render in the app activities section of Google+ here:

https://plus.google.com/apps/

To prevent spam in the stream, the user must explicitly share to their stream in Google+. You can do this using Shares and Interactive Posts.