gpt4 book ai didi

ios - 如何获取 Facebook 用户的已验证状态

转载 作者:行者123 更新时间:2023-11-29 13:16:45 26 4
gpt4 key购买 nike

我与 HelloFacebookSample 一起使用 iOS 版 Facebook SDK 从用户帐户中检索已验证 状态。

我试图在下面的方法中从 user 实例中检索。但它似乎没有定义
那里。

如何检索已验证状态?

- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView
user:(id<FBGraphUser>)user {
// here we use helper properties of FBGraphUser to dot-through to first_name and
// id properties of the json response from the server; alternatively we could use
// NSDictionary methods such as objectForKey to get values from the my json object
self.labelFirstName.text = [NSString stringWithFormat:@"Hello %@!", user.first_name];
// setting the profileID property of the FBProfilePictureView instance
// causes the control to fetch and display the profile picture for the user
self.profilePic.profileID = user.id;
self.loggedInUser = user;
}

最佳答案

我得到了答案:

- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView
user:(id<FBGraphUser>)user {
// here we use helper properties of FBGraphUser to dot-through to first_name and
// id properties of the json response from the server; alternatively we could use
// NSDictionary methods such as objectForKey to get values from the my json object
self.labelFirstName.text = [NSString stringWithFormat:@"Hello %@!", user.first_name];
// setting the profileID property of the FBProfilePictureView instance
// causes the control to fetch and display the profile picture for the user
self.profilePic.profileID = user.id;
self.loggedInUser = user;

NSLog(@"userInfo %@",[user objectForKey:@"verified"]);

}

关于ios - 如何获取 Facebook 用户的已验证状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15582426/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com