简体   繁体   English

在IOS上发布Facebook时,我收到了错误消息

[英]While posting on Facebook in IOS I am getting error

I am new in iPhone application development. 我是iPhone应用程序开发的新手。 while sending post on Facebook I am getting an error saying please try again . 在Facebook上发帖时我收到错误说please try again

please help me to solved this problem 请帮我解决这个问题

- (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);
                              }
                          }];
}

Try removing the links from your strings and see if that fixes the issue. 尝试从字符串中删除链接,看看是否能解决问题。


EDIT: 编辑:

Pre-populating any field for the user is against Facebook's policies that's why the SDK doesn't let you post it. 为用户预先填充任何字段都违反了Facebook的政策 ,这就是SDK不允许您发布的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为 iOS 运行 flutter 项目时出现错误 - I am getting error while running the flutter project for iOS 在iOS中使用FBDailog在用户墙上发布图像时出错 - getting error while posting image on user wall using FBDailog in iOS 该操作无法完成。 (com.facebook.sdk错误5。)在Facebook iOS上发布时 - The operation couldn’t be completed. (com.facebook.sdk error 5.) while posting on facebook ios 为什么在创建 XCFramework 时出现此错误?:为 iOS 模拟器构建时,在路径中找不到库 - Why am I getting this error while creating XCFramework?: While building for iOS Simulator, no library was found in path iOS 中的 NSURLConnection 出现错误 -1100? - I am getting error -1100 for NSURLConnection in iOS? Appcelerator Facebook模块错误在iOS上发布照片 - Appcelerator Facebook Module Error Posting Photo on IOS 使用SDK for iOS将视频发布到Facebook时出错 - Error posting video to Facebook using SDK for iOS 验证我的ios应用程序时,出现与CoreData相关的有效负载错误 - While validating my ios app I am getting payload error which is related to CoreData 归档我的iOS应用程序时出现URL方案错误 - I am getting URL schemes error while archiving my iOS app 尝试使用Appium 1.6.4安装macaca来检查iOS应用中的元素时出现错误 - I am getting an error while trying to install macaca to inspect elements in iOS app using Appium 1.6.4
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM