iOS6Facebook統合を利用するようにiOSアプリを更新したいと思います。現在、Facebookのダイアログを使用しています。ユーザーにダイアログを表示する方法が気に入っています。ダイアログが投稿されると、アプリアイコンと、アプリにリンクする「アプリ名経由」という小さなタグが表示されます。
iOS 6 Facebookとの統合により、「iOS経由」とAppleのWebサイトへのリンクが表示されます。iOS 6のFacebook統合を使用して同じタイプの結果を達成する方法はありますか?
現在のコード:
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];
私のiOS6コード(Facebookのサンプルコードから取得)
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;
}];