Selecting and posting to a Facebook Friend's wall from an iOS app
===

I'm using the Facebook Hackbook sample code below in an app. The method **getFriendsCallAPIDialogFeed** says (in the comments) that this method "get's the user's friends, allowing them to pick one and post on their wall"

        /*
     * Helper method to first get the user's friends then
     * pick one friend and post on their wall.
     */
    - (void)getFriendsCallAPIDialogFeed {
        // Call the friends API first, then set up for targeted Feed Dialog
        currentAPICall = kAPIFriendsForDialogFeed;
        [self apiGraphFriends];
    }

however in line     **currentAPICall = kAPIFriendsForDialogFeed;** it calls the request method below and then **kAPIFriendsForDialogFeed**.

The problem I'm having is that it picks a user's friend randomly. I need the user to be able to select a friend of their choice instead.

thanks for any help


    - (void)request:(FBRequest *)request didLoad:(id)result {
        [self hideActivityIndicator];
        if ([result isKindOfClass:[NSArray class]] && ([result count] > 0)) {
            result = [result objectAtIndex:0];
        }
        switch (currentAPICall) {
    
            case kAPIFriendsForDialogFeed:
            {
                NSArray *resultData = [result objectForKey: @"data"];
                // Check that the user has friends
                if ([resultData count] > 0) {
                    
                    // Pick a random friend to post the feed to
                    int randomNumber = arc4random() % [resultData count];
                    [self apiDialogFeedFriend: 
                     [[resultData objectAtIndex: randomNumber] objectForKey: @"id"]];
                } else {
                    [self showMessage:@"You do not have any friends to post to."];
                }
                break;
            }




