【问题标题】:How to post media on google plus through google api?如何通过google api在google plus上发布媒体?
【发布时间】:2015-04-09 20:53:33
【问题描述】:
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();
}

我试过了,但没有用,请给我任何其他解决方案。

【问题讨论】:

  • 你说的不工作是什么意思?您收到任何异常或错误消息?

标签: c# asp.net post google-plus


【解决方案1】:

时刻与发布到 Google+ 时间线不同,它不可能发布到 Google+ 时间线。见Issue 41: Write access to the streams

为了发布不同的时刻,您需要能够将request_visible_actions 设置为身份验证过程的一部分,并且似乎与当前版本的C#客户端库see

如果您想发布时刻而不是写入用户时间线,那么您将必须弄清楚如何发送 request_visible_actions 作为身份验证的一部分。如果您确实知道该怎么做,请在我的问题上发布答案。

【讨论】:

    猜你喜欢
    • 2017-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-05
    • 1970-01-01
    • 2011-12-13
    相关资源
    最近更新 更多