gpt4 book ai didi

ios - 无法使用 facebook new sdk 3.11 将链接和图像发布到 friend 墙上

转载 作者:行者123 更新时间:2023-11-29 03:22:36 26 4
gpt4 key购买 nike

我正在使用 facebook new sdk 3.11 通过 fbwebdialog 将链接和图像发布到 friend 墙。在提供链接参数时出现以下错误。(如下面的屏幕截图所示)

enter image description here

我正在使用 Xcode 5,我的代码如下

NSMutableDictionary *params1 = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"TESTING PURPOSE", @"name",@"545268428900714",@"app_id",fid,@"to",@"http://www.google.com",@"link", nil];


[FBWebDialogs presentFeedDialogModallyWithSession:nil parameters:params1 handler:
^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
{
NSLog(@"result ======%@",resultURL);
if (error)
{
NSLog(@"error ======%@",error);
}
else
{
if (result == FBWebDialogResultDialogNotCompleted)
{
NSLog(@"User canceled story publishing.");
}
else
{
NSDictionary *urlParams = [self parseURLParams:[resultURL query]];
if (![urlParams valueForKey:@"post_id"])
{
NSLog(@"User canceled story publishing.");
}
else
{
// [FBSession.activeSession close];
//[FBSession.activeSession closeAndClearTokenInformation];


double delayInSeconds = 0.5;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){


UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Thank You!" message:[NSString stringWithFormat:@"Your Post has been Posted to your friends wall!"] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

[alertView show];


});


}
}
}
}];

最佳答案

发生此错误的原因是所选应用程序是 Graph 资源管理器,并且其 Canvas /站点 url 未指向您的站点。

这个答案来自 WordPress forums via user Samuel Wood (Otto) :

前往 Facebook 应用程序。编辑其设置。在“高级设置”页面上,禁用“流帖子 URL 安全”选项。

引用this所以问题。

关于ios - 无法使用 facebook new sdk 3.11 将链接和图像发布到 friend 墙上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20898325/

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