我已经能够将user.name facebook属性传递给profileViewController。
但是我无法发送FBProfilePicture,虽然这里有以下方法:
// this method will be called when the user information has been fetched
- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id<FBGraphUser>)user
{
FBProfilePicture.profileID = user.id;
FBNamePass = user.name;
[self pushViewController:FBNamePass andProfilePicture:FBProfilePicture];
}
以及方法:
- (void)pushViewController:(NSString *)user andProfilePicture:(FBProfilePictureView *)profilePicture
{
NeXtViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"NeXt"];
controller.FBNameString = user;
//controller.profilePicture.profileID = profilePicture.profileID;
[controller setFBProfilePicture:profilePicture];
[self.navigationController pushViewController:controller animated:NO];
}
我有什么问题吗?
答案 0 :(得分:0)
似乎首先需要初始化对象,然后才为它设置属性:
FBProfilePicture = [[FBProfilePictureClass alloc] init];
FBProfilePicture.profileID = user.id;