gpt4 book ai didi

ios - 在 IOS 的 Facebook 上发帖时出现错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:14:27 24 4
gpt4 key购买 nike

我是 iPhone 应用程序开发的新手。在 Facebook 上发送帖子时,我收到一条错误消息,提示 请重试

请帮我解决这个问题

- (void)ToPostOnFB   
{
NSMutableDictionary *dic=[[NSMutableDictionary alloc]init];
NSString *scoreBoard = [[NSString alloc]init];
clsChat *cls=[[clsChat alloc] init];
cls=[self.aryUserChat objectAtIndex:0];
NSString *ch= [(AppObj) removeApostropheFromString:cls.clsChatMsg callingType:@"fetch"];

score = [NSString stringWithFormat:@"%@ \n%@ %@ \n%@ %@",self.lblPeriod.text,self.lbl1.text,self.lbl2.text,self.lbl3.text,self.lbl4.text];

NSString *c = [NSString stringWithFormat:@"Post: \n%@ \nGet the app to follow your favorite teams https://goo.gl....", ch];
NSString *title = [NSString stringWithFormat:@"Post 2: \n%@ \nGet the app to follow your favorite teams https://goo.gl...\n\n%@", score,c];
dic= [NSMutableDictionary dictionaryWithObjectsAndKeys:title,@"message",nil];

NSLog(@"%@",dic);

[FBRequestConnection startWithGraphPath:@"/me/feed"
parameters:dic
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {

if (!error) {
// Link posted successfully to Facebook
NSLog(@"result: %@", result);

UIAlertView *alertShare = [[UIAlertView alloc] initWithTitle:@"" message:@"Shared Successfully" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertShare show];
} else {

UIAlertView *alertShare = [[UIAlertView alloc] initWithTitle:@"" message:@"Please try again" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertShare show];

NSLog(@"%@", error.description);
}
}];
}

最佳答案

尝试从您的字符串中删除链接,看看是否能解决问题。


编辑:

为用户预填充任何字段违反了Facebook's policies这就是 SDK 不允许您发布它的原因。

关于ios - 在 IOS 的 Facebook 上发帖时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31490453/

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