问题
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