[英]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.