i have integrated Facebook sdk in Xcode 6 (with swift). During the login i request the public_profile permission:
FBSession.openActiveSessionWithReadPermissions(
@Brandon Gao solution gave me a 200X200 thumbnail...
To get a bigger size I used FBSDKProfile
to get a path with size, that is also more modular and not hard-coded (although I did have to type in the graph.facebook.com part...)
let size = CGSize(width: 1080, height: 1080)
let path = FBSDKProfile.currentProfile().imagePathForPictureMode(.Normal, size: size)
let url = "https://graph.facebook.com/\(path)"
Alamofire.request(.GET, url, parameters: nil, encoding: ParameterEncoding.URL).response {
(request, response, data, error) -> Void in
if let imageData = data as? NSData,
let image = UIImage(data: imageData) {
self.buttonImage.setImage(image, forState: .Normal)
}
}
Somehow I didn't get a 1080X1080 image though, FB gave me a 1117X1117... :\