[英]How to retrieve an image from fbprofilepictureview and store this image into database
顯示個人資料圖片。
self.userProfileImage.profileID = user.id;
但
for (NSObject *obj in [userProfileImage subviews]) {
if ([obj isMemberOfClass:[UIImageView class]]) {
UIImageView *objImg = (UIImageView *)obj;
img_ProfilePictureImg.image = objImg.image;
break;
}
}
img_ProfilePictureImg.image=[UIImage imageWithContentsOfFile:profileImage];
我沒有--- fbprofilepicture
UIImage *img_Profile = --------.imageView.image; // How to get that image view
NSData *dataOfProfilePic = UIImagePNGRepresentation(img_Profile);
https://graph.facebook.com/username/picture?redirect=true
使用此網址,您可以獲得個人資料照片。
在Facebook代表loginViewFetchedUserInfo
您可以獲取用戶個人資料圖片的圖片網址
- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView
user:(id<FBGraphUser>)user
{
NSString *imageUrl=[NSString stringWithFormat:@"https://graph.facebook.com/%@/picture?redirect=true", user.username];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.