How do I display User's name in caption when a user uploads a photo using Facebook PHP SDK?
===

After some extensive research I managed to create a Facebook App using the PHP SDK.

I primarily created this app to give the opportunity for users to upload their photos for a competition on my facebook page. I am currently using the following code:

    $valid_files = array('image/jpeg', 'image/png', 'image/gif');
    
    if(isset($_FILES) && !empty($_FILES)){
        if( !in_array($_FILES['pic']['type'], $valid_files ) ){
            echo 'Only jpg, png and gif image types are supported!';
        }else{
            $img = realpath($_FILES["pic"]["tmp_name"]);
    
            $args = array(
            'message' => 'Please press Like to vote for this picture',
                'image' => '@' . $img,
                'aid' => $album_id,
    
            );
    
            $photo = $facebook->api($album_id . '/photos', 'post', $args);
            if( is_array( $photo ) && !empty( $photo['id'] ) ){
                echo '<p><a target="_blank" href="http://www.facebook.com/photo.php?fbid='.$photo['id'].'">Click here to watch this photo on Facebook.</a></p>';
            }
        }
    }

Every time someone uploads a picture they get the following caption - 'Please press Like to vote for this picture'

I would like to know who uploaded the picture so I would like this caption instead - 'Please press Like to vote for this picture. This was uploaded by John Smith'

John Smith in this case would be the person who uploaded the photo. How can I go about this please.

I would like the name to change the user depending on the user who uploaded the photo and I would like it linkable so anyone can visit their "uploader's" profile.

I would like some sample code to help me - I am not code hunting but I am really stuck.

Thanks.
