2

I am using facebook SDK 3.13 for posting on user's friends wall using fbwebdialogs. When i set params for this dialog it does not show them on dialog.

    NSMutableDictionary *params=[NSMutableDictionary new];
    FBSession *ses=[FBSession activeSession];
    [params setValue:@"hello" forKey:@"caption"];
    [params setValue:@"hello" forKey:@"decription"];
    [params setValue:@"whats" forKey:@"name"];
    [params setValue:@"http://i.imgur.com/g3Qc1HN.png" forKey:@"picture"];
    [params setValue:@"http://www.dsvv.org" forKey:@"link"];

    [FBWebDialogs presentFeedDialogModallyWithSession:ses parameters:params handler:^(FBWebDialogResult result,NSURL *url,NSError *error){

        if (error) {

        }

    }];

}

it does not identify these link and produce an error. If someone who posted on user's friends wall please notify me regarding this.

1 Answers1

1
str_link = @"www.google.com";

 NSString *str_img = [NSString stringWithFormat:@"%@uploads/%@-5.jpg",app.Main_url,[Data_Dict objectForKey:@"deal_id"]];
             //NSLog(@"%@",str_img);  


  NSDictionary *params = @{
                             @"name" : str_name,
                             @"caption" : @"",
                             @"description" : @"",
                             @"picture" : str_img,
                             @"link" : str_link,
                             @"to":str_id,
                             };


    // Invoke the dialog
    [FBWebDialogs presentFeedDialogModallyWithSession:nil
                                           parameters:params
                                              handler:
     ^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
         if (error) {
             NSLog(@"Error publishing story.");
             [self.indicator stopAnimating];
         } else {
             if (result == FBWebDialogResultDialogNotCompleted) {
                 NSLog(@"User canceled story publishing.");
                 [self.indicator stopAnimating];
             } else {
                 NSLog(@"Story published.");
                 [self.indicator stopAnimating];
             }
         }}];
Bhavesh Nayi
  • 3,626
  • 1
  • 27
  • 42