objective-c – 从我在Facebook的应用程序发布
发布时间:2020-12-16 07:02:02 所属栏目:百科 来源:网络整理
导读:我想更新我的iOS应用程序以利用iOS 6 Facebook集成.目前我使用Facebook对话.我喜欢我可以向用户呈现对话的方式,当它发布时,它有我的应用程序图标和小标签“通过我的应用名称”链接到我的应用程序. 通过iOS 6 Facebook集成,它“通过iOS”和Apple网站链接.有没
我想更新我的iOS应用程序以利用iOS 6 Facebook集成.目前我使用Facebook对话.我喜欢我可以向用户呈现对话的方式,当它发布时,它有我的应用程序图标和小标签“通过我的应用名称”链接到我的应用程序.
通过iOS 6 Facebook集成,它“通过iOS”和Apple网站链接.有没有办法使用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]; 我的iOS 6代码(取自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; }]; 解决方法
快速谷歌搜索显示以下教程:
http://www.techotopia.com/index.php/IPhone_iOS_6_Facebook_and_Twitter_Integration_using_SLRequest#Facebook_Integration_using_SLRequest 这似乎是一个很好的教程来做你想要的.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |