2012-07-06 47 views
0

獲得活動列表我使用的.NET谷歌加API和我想的指定配置文件的活動清單(頁/用戶..)。谷歌,加上API在C#.NET librarry

我有這樣的代碼,我得到它的在線

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. 

回答

0

請求的鍵無效。只要把正確的ClientSecret & ClientIdentifier。