[英]How to get facebook, twitter profile(name ,image) in iOS6
I have implemented facebook and twitter for ios6, but I'm not getting user details like name, email, image. 我已经为iOS6实现了facebook和twitter,但是我没有得到用户详细信息,例如姓名,电子邮件,图像。 Would help me anybody for this?
会帮助我吗? Below is my code:
下面是我的代码:
-(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];
}
}
See this info on using the Twitter framework and how to get information from Twitter, specifically, see Step 7 . 有关使用Twitter框架以及如何从Twitter获取信息的信息,请参阅步骤7 。
http://mobile.tutsplus.com/tutorials/iphone/ios-sdk_twitter-framework_twrequest/ http://mobile.tutsplus.com/tutorials/iphone/ios-sdk_twitter-framework_twrequest/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.