2
我正在尝试在Facebook上集成共享登录在我的应用程序中,但不知何故,我无法实现这一点,因为我在Facebook社区框架中共享位置。使用社交框架在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.....");
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]];
}
break;
case SLComposeViewControllerResultDone:
{
NSLog(@"Posted....");
}
break;
}};
[fbController setInitialText:@"This is My Sample Text"];
[fbController setCompletionHandler:completionHandler];
[self presentViewController:fbController animated:YES completion:nil];
}
else{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Sign in!" message:@"Please first Sign In!" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
[alert show];
}
这个我可以分享的初始文本,但我需要的是分享的是当前位置。
在此先感谢。
想用图形API?【检查】(http://stackoverflow.com/questions/20329083/how- to-share-location-on-facebook-with-message-using-https-graph-faceboo) – 2015-03-19 06:43:38
@UmangBista你有没有理解这个问题? – 2015-03-19 06:48:21
你想要: '文字发布'感觉'位置'感谢? – 2015-03-19 06:52:31