1
private void googleplue()
{
    Moment body = new Moment();
    ItemScope itemScope = new ItemScope();

    itemScope.Id = "replacewithuniqueforaddtarget";
    itemScope.Image = "http://www.google.com/s2/static/images/GoogleyEyes.png";
    itemScope.Type = "";
    itemScope.Description = "The description for the action";
    itemScope.Name = "An example of add activity";

    body.Object = itemScope;
    body.Type = "http://schema.org/AddAction";

    MomentsResource.InsertRequest insert =
        new MomentsResource.InsertRequest(
            plusService,
            body,
            userId,
            MomentsResource.Collection.Vault);
   // Moment wrote = insert.Fetch();
}

I tried this but not work please give me any other solution.

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Muhammad Babar
  • 111
  • 1
  • 4

1 Answers1

1

Moment isn't the same as posting to Google+ timeline its not possible to post to the Google+ timeline. see Issue 41: Write access to the streams

In order to post moments which isn't the same thing, you need to be able to set request_visible_actions as part of the authentication process and it doesn't appear that its possible to do with with the current version of the C# client library see

If you want to post moments and not write to a user time line then your going to have to figure out how to send the request_visible_actions as part of your authentication. if you do figure out how to do that please post the answer on my question.

Community
  • 1
  • 1
Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449