gpt4 book ai didi

objective-c - 从我的 Facebook 应用程序发帖

转载 作者:可可西里 更新时间:2023-11-01 06:11:12 26 4
gpt4 key购买 nike

我想更新我的 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
这似乎是一个很好的教程,可以帮助您完成您正在寻找的事情。

关于objective-c - 从我的 Facebook 应用程序发帖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13241239/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com