FBProfilePictureView object won't show image

2020-02-12 01:48发布

I'm doing the scrumptios facebook developer tutorial for the 3.1 iOS SDK. I've managed to display my profile name from facebook, however the FBProfilePictureView wont show the picture

here's the code for iboutlet

@property (strong, nonatomic) IBOutlet FBProfilePictureView *useProfileImage;

here is what I used to display the pic

self.useProfileImage.profileID = user.id;

I have confirmed that the it changed the profileid variable of the image by displaying it in a label.

When I first ran the project I had this error

"2012-05-18 04:04:11.620 Scrumptious[6548:f803] Unknown class FBProfilePictureView in Interface Builder file."

and solved it they way the FB tutorial suggested- by adding [FBProfilePictureView class]; to "applicationdidfinishlaunching: withoptions" in the app delegate.

any idea why the picture wouldn't show?

link to the tutorial

7条回答
Lonely孤独者°
2楼-- · 2020-02-12 02:16

To resolve this, add this as the first line in the app delegate's application:didFinishLaunchingWithOptions: method:

[FBProfilePictureView class];

查看更多
登录 后发表回答