RayChen
RayChen

Reputation: 1468

FBProfilePictureView can't get user id

I just start to learn Facebook IOS SDK and now meet a problem. I want to load user profile view but failed. Here is my code.

-(void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id<FBGraphUser>)user
{
    loggedInUser=user;
    profilePic.profileID=user.id;
}

I can obtain user.id, but profileID is nil. I don't use storyboard to create FBProfilePictureView. Please help on this. Many thanks

Upvotes: 1

Views: 373

Answers (1)

Davide
Davide

Reputation: 561

follow this tutorial https://developers.facebook.com/docs/tutorials/.../3.0/scrumptious/ Plus, in order to load the imagepicture you have to do this: in IB uncheck use autolayout for FBprofilepictureview, also uncheck "autoresize subviews" into the view. It works for me!

Upvotes: 2

Related Questions