iOS 6 Facebook 통합을 활용하기 위해 iOS 앱을 업데이트하고 싶습니다. 현재 저는 Facebook 대화를 사용하고 있습니다. 나는 대화를 사용자에게 보여줄 수있는 방식을 좋아하고 게시 할 때 내 앱 아이콘과 작은 태그가 "내 앱 이름을 통해"라고 말하면서 내 앱에 연결됩니다.Facebook의 내 앱에서 게시
iOS 6 페이스 북 통합으로 "iOS를 통해"라고 말하고 Apple 웹 사이트 링크. iOS 6의 Facebook 통합을 사용하여 같은 유형의 결과를 얻을 수있는 방법이 있습니까?
현재 코드 : http://www.techotopia.com/index.php/IPhone_iOS_6_Facebook_and_Twitter_Integration_using_SLRequest#Facebook_Integration_using_SLRequest
좋은 것 같다 : (페이스 북의 샘플 코드에서 가져온)
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"1234567890", @"app_id",
@"http://www.mywebsite.com/page5/page5.html", @"link",
picLink, @"picture",
countDownName, @"name",
@"My app name", @"caption",
@"For the iPhone and iPod Touch", @"description",
theMessage, @"message",
theFriendID, @"to",
@"Share on Facebook", @"user_message_prompt",
nil];
[facebook dialog:@"feed" andParams:params andDelegate:self];
내 아이폰 OS 6 코드는
BOOL displayedNativeDialog = [FBNativeDialogs presentShareDialogModallyFrom:self
initialText:initialText
image: [UIImage imageNamed: @"myImage.png"]
url:url
handler:nil];
if (!displayedNativeDialog) {
[self performPublishAction:^{
// otherwise fall back on a request for permissions and a direct post
[FBRequestConnection startForPostStatusUpdate:message
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
[self showAlert:message result:result error:error];
self.buttonPostStatus.enabled = YES;
}];
self.buttonPostStatus.enabled = NO;
}];