我正在将我的应用程序升级到Facebook-iOS-SDK-4.0,但似乎我无法收到用户的电子邮件FBSDKProfile,因为它只提供,用户名,用户ID等.
如何在用户会话打开时获取用户名.我尝试了来自Facebook sdk示例的会话登录示例.如果有人知道解决方案,请帮助我.提前致谢.
 - (IBAction)buttonClickHandler:(id)sender {
        // get the app delegate so that we can access the session property
        SLAppDelegate *appDelegate = [[UIApplication sharedApplication]delegate];
        // this button's job is to flip-flop the session from open to closed
        if (appDelegate.session.isOpen) {
            // if a user logs out explicitly, we delete any cached token information, and next
            // time they run the applicaiton they will be presented with log in UX again; most
            // users will simply close the app or switch away, …我正在开发一个需要Facebook登录的ios应用程序.我已经成功实现了登录过程.但是现在我无法找到如何以及在哪里可以获得用户的个人资料信息,如名字,姓氏,个人资料图片等. ..我的应用有权访问firstName,lastName,个人资料照片和电子邮件.
虽然我已经导入了 FacebookSDK,例如:#import <FacebookSDK/FacebookSDK.h>,但它说:使用未声明的标识符“FBSDKGraphRequest”。
我写的代码很简单:
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                                      initWithGraphPath:@"/{user-id}/albums"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                              id result,
                                              NSError *error) {
            // Handle the result
        }];
让我知道我可能会遗漏什么?