I have a helper function that captures an image at a specific URL:
func getProfilePicture(fid: String) -> UIImage? { if (fid != "") { var imageURLString = "http://graph.facebook.com/" + fid + "/picture?type=large" var imageURL = NSURL(string: imageURLString) var imageData = NSData(contentsOfURL: imageURL!) var image = UIImage(data: imageData!) return image } return nil }
I go to the getProfilePicture () call with the Facebook user ID and save the output to UIImageView. My question is: how can I find the Facebook user ID? Request a connection via Facebook? It would be helpful if the code was given here.
Thank you for your help.
source share