简体   繁体   中英

FBProfilePictureView does not show profile picture after login

I am using Facebook IOS SDK to display profile pictures of a few friends. When the app is not signed-in, FBProfilePictureView can display different pictures by assigning profileIDs. However, it displays nothing when the app is associated with a signed-in user. Why?

Thank you!

I had the same problem. If your app is designed like mine, you are likely setting the profileID in a callback that is executed once the FB user is logged in. The problem is the view controller doesn't know to update the FBProfilePictureView. The solution I found was to just update the model user object in the callback by assigning the profileID to one of its properties. You can then use that property to update the FBProfilePictureView's profileID property in the view controller's viewWillAppear property.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM