谷歌,加上API获得活动列表在C#.NET librarry(Google plus API get

2019-10-16 23:41发布

我使用的是.NET谷歌加API和我想的指定配置文件的活动清单(页/用户..)。

我有这样的代码,我得到它的在线

 var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description);
    provider.ClientIdentifier = GoogleIdentifier;
    provider.ClientSecret = GoogleSecret;
 ActivitiesResource.Collection collection = new ActivitiesResource.Collection();
  var service = new PlusService();
    service.Key = GoogleKey;
    ActivitiesResource.ListRequest list = service.Activities.List(ProfileID, collection);
    ActivityFeed activityFeed = list.Fetch();
    int count = activityFeed.Items.Count;

在这条线:

ActivityFeed activityFeed = list.Fetch();

我得到以下错误:

An item with the same key has already been added.

Answer 1:

请求的键无效。 只要把正确的ClientSecret&ClientIdentifier。



文章来源: Google plus API get the Activities List in C#.net librarry