1

I am trying to post on users wall using ios app by using FB New graph API 3.17.1.But when I post using the graph path me/photos, it will create an bunch of post at one location instead of posting the images as separate story.

I did lot of R&D and found this Post photo on user's wall using Facebook iOS SDK

I used below method to post on user's wall

  NSMutableDictionary* postParams = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                                                     @"<Image URL>", @"picture",
                                                                     @"Facebook SDK for iOS", @"name",
                                                                     @"build apps.", @"caption",
                                                                     @"testing for my app.", @"description",

                                                                     nil];
[FBRequestConnection startWithGraphPath:@"me/feed"
                     parameters:postParams
                     HTTPMethod:@"POST"
                     completionHandler:^(FBRequestConnection *connection, id result,NSError *error)
                    { 
                        if (error) 
                        {
                             NSLog(@"Error in uploading the photo %@",error);
                        }
                    }];

This method does paste the image on user's wall but for this image has to be uploaded somewhere on internet and we have supply the URL of same.And additionally it makes image visibility very less compared to image posted using me/potos.

   [FBRequestConnection startWithGraphPath:@"me/photos" parameters:params
                                                        HTTPMethod:@"POST"
                                                        completionHandler:^(FBRequestConnection*connection, id result, NSError *error) 
                                                       {
                                                           NSLog(@"Error : %@",error);
                                                           NSLog(@"%@",result);
                                                       }];

I used above method but it will group the photos into bunch and make the album on the users wall after 3-4 post. And additionally it has limitation of max 25 post per app per day. So this method is negligible.

Please let me know any alternative way, if anyone has used.I would be very thankful.

Community
  • 1
  • 1
Parvez Belim
  • 1,003
  • 13
  • 36

0 Answers0