Google plus API get the Activities List in C#.net librarry

一个人想着一个人 提交于 2019-12-25 04:04:58

问题


I'm Using the .net Google Plus API and i want to get the list of activities of a specified profile(page/user..).

I have this code which i get it online

 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;

on this line:

ActivityFeed activityFeed = list.Fetch();

I get the following error:

An item with the same key has already been added.

回答1:


The requested keys was invalid. Just Put the right ClientSecret & ClientIdentifier.



来源:https://stackoverflow.com/questions/11370362/google-plus-api-get-the-activities-list-in-c-net-librarry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!