SocialFramework를 통해 아래 방법을 사용하여 사용자에게 페이스 북 사용 권한을 요청하는 메시지가 표시되지만 기본 프로필 정보 (이름, 이메일, 아이디 등)를 검색하여 표시 할 수없는 것 같습니다. ..) 나는 이것을위한 간단한 방법이 있다고 상상하지만 찾을 수는 없다. 아무도 여기서 도움을 줄 수 있습니까? 감사합니다검색 facebook 프로필 정보 iOS6
-(IBAction)getInfo:(id)sender{
NSLog(@"FIRING");
ACAccountStore *_accountStore = [[ACAccountStore alloc] init];
ACAccountType *facebookAccountType = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
// We will pass this dictionary in the next method. It should contain your Facebook App ID key,
// permissions and (optionally) the ACFacebookAudienceKey
NSDictionary *options = @{ACFacebookAppIdKey : @"284395038337404",
ACFacebookPermissionsKey : @[@"email"],
ACFacebookAudienceKey:ACFacebookAudienceOnlyMe};
// Request access to the Facebook account.
// The user will see an alert view when you perform this method.
[_accountStore requestAccessToAccountsWithType:facebookAccountType
options:options
completion:^(BOOL granted, NSError *error) {
if (granted)
{
NSLog(@"GRANTED");
// At this point we can assume that we have access to the Facebook account
NSArray *accounts = [_accountStore accountsWithAccountType:facebookAccountType];
// Optionally save the account
[_accountStore saveAccount:[accounts lastObject] withCompletionHandler:nil];
}
else
{
NSLog(@"Failed to grant access\n%@", error);
}
}];
} 페이스 북이 경우에 화면 이름이나 설명으로 당신은 단지 당신이 얻고있는 계정의 아주 기본적인 정보에 액세스 할 수 있습니다 게시 한 코드로
안녕하세요. 해결책이 있습니까? 나는 널 응답을 얻고있다. –
실제로 아직 아래의 솔루션을 테스트/구현할 기회가 없었습니다. – Fluffhead