gpt4 book ai didi

ios - 分享到 Facebook 墙

转载 作者:行者123 更新时间:2023-11-29 03:21:55 25 4
gpt4 key购买 nike

我正在使用 facebook sdk,需要将详细信息分享到 facebook 时间线。我正在使用以下 API 调用。

  [FBRequestConnection startWithGraphPath:@"/feed"
parameters:dictionary
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error)
{
if (!error) {
[VBUtility showAlertWithTitle:@"Facebook" message:@"Deal details posted successfully"];
}
}];

故事发布在 facebook 上,不是在用户的时间线上,而是在用户的新闻源上(该文档说明此方法确实如此 - 此人或其他人在其个人资料上发布的帖子和链接。)。我也尝试过/home 方法调用。当我尝试使用内置的 Facebook 共享时,

SLComposeViewController *fbPost = [SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeFacebook];

它完美地发布到用户的时间线以及新闻提要中。我已经在 developer.facebook.com 中配置了应用程序。我需要在这里提及任何权限吗?有谁能帮我找出错误吗?权限请求,

 NSArray *permissions = [[NSArray alloc]initWithObjects:@"publish_actions",@"user_birthday",@"publish_stream",@"user_about_me",@"email",@"basic_info",nil];

传递的参数是,

NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:
app_id, @"app_id",
name,@"name",
caption, @"caption",
description,@"description",
link, @"link",
picture, @"picture",
@"1",@"fb:explicitly_shared",
nil];

最佳答案

试试这个,

 [FBRequestConnection startWithGraphPath:@"me/feed"
parameters:dictionary
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error)
{
if (!error) {
[VBUtility showAlertWithTitle:@"Facebook" message:@"Deal details posted successfully"];
}
}];

我对你的代码做了一点改动。将您的路径更改为 @"me/feed"。希望这对您有所帮助。

关于ios - 分享到 Facebook 墙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20968261/

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