2
votes

I have an iOS app that is posting multiple photos to facebook feed using graph api.

I have accomplished this by posting to graph path "me/photos". This puts the photos in the default App Album and shows it on the user feed. Exactly as I want.

The problem is if I create a second (or multiple) posts, it merges the second post and subsequent posts with the first post and shows it at top of the feed. So If I make X posts, there is only 1 entry in the feed and all images from the posts are posted to the album.

Whereas I want to be able to make multiple posts and have them show as separate posts on the feed.

Here's the high level code for one post:

while (key = [k nextObject]) {
    item = [self.selectedItemsDict objectForKey:key];
    url = [item objectForKey:kPicURLKey];
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   url, @"url", nil];
    [FBRequestConnection startForPostWithGraphPath:@"me/photos" graphObject:(FBGraphObject*)params completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
        if (!error) {
            NSLog(@"done posting");
        }
    }];
 }

How can I make multiple posts to feed (& album), each with 1 or more photos and have them show as separate posts on the users wall?

Just looking for a general approach how to do this using Graph api, not necessarily code.

1
Would appreciate any help or feedback?bilalm

1 Answers

0
votes

You could use me/albums to create new album, ALBUM_ID/photos to upload a photo.