// called when the data is ready form facebook void photo_response(IDictionary<String, object> res) { object response; // getting all photos if (res!= null && res.TryGetValue("data", out response)) { foreach (JsonObject _post in (JsonArray)response) { model = new FacebookItemViewModel(_post); if (model.source_url != null) { // add album image source to allImages collection AlbumImage image = new AlbumImage(); image.source_url = model.source_url; hubTileUrl = model.source_url; App.allImages.Add(image); } } this.AllImagesListBox.ItemsSource = App.allImages; } else { MessageBoxResult m = MessageBox.Show("Facebook null response", "Response", MessageBoxButton.OK); } }
void album_grp_response(IDictionary<String, object> res) { object response; // getting all photos if (res.TryGetValue("data", out response)) { foreach (JsonObject _post in (JsonArray)response) { model = new FacebookItemViewModel(_post); if (model.source_url != null) { AlbumImage image = new AlbumImage(); image.source_url = model.source_url; App.albumImages.Add(image); } } } }