1
美好的一天。通過.NET製作Google Plus(C#)
有沒有人有一個工作示例如何通過.NET(C#)進行Google Plus發佈。
我已經嘗試谷歌和stackoverflow搜索,但沒有設法找到解決方案。
我順利拿到帖子:
public void Post(string text)
{
PlusService plus = new PlusService {Key = "MYVERYSECRETKEY"};
ActivitiesResource ar = new ActivitiesResource(plus, null);
ActivitiesResource.ListRequest list = ar.List("108055870103885325249", new ActivitiesResource.Collection());
ActivityFeed feed = list.Fetch();
string activityKey = "";
foreach (var a in feed.Items)
if (a.Url == "https://plus.google.com/108055870103885325249/posts/EtvvUgn8eKz")
{
activityKey = a.Id;
break;
}
ActivitiesResource.GetRequest get = ar.Get(activityKey);
Activity act = get.Fetch();
var sb = new System.Text.StringBuilder();
sb.AppendLine("Title: " + act.Title);
sb.AppendLine("URL:" + act.Url);
sb.AppendLine("Published:" + act.Published);
sb.AppendLine("By:" + act.Actor.DisplayName);
sb.AppendLine("Annotation:" + act.Annotation);
sb.AppendLine("Content:" + act.Object.Content);
sb.AppendLine("Type:" + act.Object.ObjectType);
sb.AppendLine("# of +1s:" + act.Object.Plusoners.TotalItems);
sb.AppendLine("# of reshares:" + act.Object.Resharers.TotalItems);
}
但我找不到決策職位的任何方法。
在此先感謝。
你見過[這個Google plus平臺頁面](https://developers.google.com/+/downloads/)嗎?它有一個(測試版現在)[.net客戶端](https://code.google.com/p/google-api-dotnet-client/) –
我使用這個庫,但無法找到如何發佈使用它 – user306080
@ user306080:請顯示您到目前爲止所嘗試的內容。 –