I'm trying to get the UIImage from ProfilePictureView given in facebook sdk. the code displays the picture when i extracted the UIImageView and added to the main view controller. but when I try to get the UIImage out from the UIImageView I instantiated, then it gives me the default profile picture of facebook. Please help!
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// txt_fname.Text = _user.First_Name;
// txt_lname.Text = _user.Last_Name;
UIImageView y = new UIImageView();
UIImage image = new UIImage ();
// btn_photo.SetBackgroundImage (fb_profile, UIControlState.Normal);
foreach (var x in fb_profile.Subviews) {
if (x is UIImageView) {
y = (UIImageView)x;
btn_photo.SetBackgroundImage (y.Image, UIControlState.Normal);
}
}
View.AddSubview (y);