{"action":"opened","issue":{"url":"https://api.github.com/repos/spring-projects/spring-social-facebook/issues/189","labels_url":"https://api.github.com/repos/spring-projects/spring-social-facebook/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-social-facebook/issues/189/comments","events_url":"https://api.github.com/repos/spring-projects/spring-social-facebook/issues/189/events","html_url":"https://github.com/spring-projects/spring-social-facebook/issues/189","id":125872780,"number":189,"title":"Album.type field is null unexpectedly","user":{"login":"jasperblues","id":430321,"avatar_url":"https://avatars.githubusercontent.com/u/430321?v=3","gravatar_id":"","url":"https://api.github.com/users/jasperblues","html_url":"https://github.com/jasperblues","followers_url":"https://api.github.com/users/jasperblues/followers","following_url":"https://api.github.com/users/jasperblues/following{/other_user}","gists_url":"https://api.github.com/users/jasperblues/gists{/gist_id}","starred_url":"https://api.github.com/users/jasperblues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasperblues/subscriptions","organizations_url":"https://api.github.com/users/jasperblues/orgs","repos_url":"https://api.github.com/users/jasperblues/repos","events_url":"https://api.github.com/users/jasperblues/events{/privacy}","received_events_url":"https://api.github.com/users/jasperblues/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-11T04:53:01Z","updated_at":"2016-01-11T04:53:01Z","closed_at":null,"body":"The following code did not work:\r\n\r\n```kotlin\r\nprivate fun candidatePhotos(): List<Photo>\r\n    {\r\n        val albums = mediaOperations.albums\r\n        val profilePictures = albums.find { it.type == Album.Type.PROFILE }\r\n        val coverPhotos = albums.find { it.type == Album.Type.COVER }\r\n\r\n        val results = ArrayList<Photo>()\r\n        if (profilePictures != null)\r\n        {\r\n            results.addAll(mediaOperations.getPhotos(profilePictures.id))\r\n        }\r\n        if (coverPhotos != null)\r\n        {\r\n            results.addAll(mediaOperations.getPhotos(coverPhotos.id))\r\n        }\r\n        return results.toList().take(5)\r\n    }\r\n```\r\n\r\nI had to change instead to: \r\n\r\n```kotlin\r\nval profilePictures = albums.find { it.name == \"Profile Pictures\" }\r\nval coverPhotos = albums.find { it.name == \"Cover Photos\" }\r\n```"}}