While posting to Facebook on IOS, I get the error

I am new to iPhone app development. I get an error when posting to Facebook please try again

.

please help me to solve 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);
                              }
                          }];
}

      

+3


source to share


1 answer


Try removing links from your lines and see if that fixes the problem.




EDIT:

Pre-filling any field for the user against Facebook policies , why the SDK won't let you publish it.

+1


source







All Articles