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