我已经为 ios6 实现了 facebook 和 twitter,但我没有获得用户详细信息,如姓名、电子邮件、图像。有人会帮助我吗?下面是我的代码:
-(IBAction)facebook
{
SLComposeViewController *fbController=[SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
SLComposeViewControllerCompletionHandler __block completionHandler=^(SLComposeViewControllerResult result){
[fbController dismissViewControllerAnimated:YES completion:nil];
switch(result){
case SLComposeViewControllerResultCancelled:
default:
{
NSLog(@"Cancelled.....facebook");
}
break;
case SLComposeViewControllerResultDone:
{
NSLog(@"Posted....facebook");
}
break;
}};
[fbController addImage:[UIImage imageNamed:@"ipadicon_72x72.png"]];
[fbController setInitialText:@"Check out this article."];
//[fbController addURL:[NSURL URLWithString:@"http://soulwithmobiletechnology.blogspot.com/"]];
[fbController setCompletionHandler:completionHandler];
[self presentViewController:fbController animated:YES completion:nil];
}
}