src/TgCommands.php
public function setProfilePhoto($mediaUri)
    {
        //Process the requested media file.
        $processedMedia = $this->processMediaUri($mediaUri);
        if ( ! $processedMedia) {
            return false;
        }

        //Send media file.
        $result = $this->exec('set_profile_photo ' . $processedMedia['filepath']);

        //Clean up if media file came from REMOTE address
        $this->cleanUpMedia($processedMedia);

        return $result;
    }
public function setProfilePhoto($mediaUri)
    {
        //Process the requested media file.
        $processedMedia = $this->processMediaUri($mediaUri);
        if ( ! $processedMedia) {
            return false;
        }

        //Send media file.
        $result = $this->exec('set_profile_photo ' . $processedMedia['filepath']);

        //Clean up if media file came from REMOTE address
        $this->cleanUpMedia($processedMedia);

        return $result;
    }
public function setProfilePhoto ( $ mediaUri ) { //Process the requested media file. $ processedMedia = $ this -> processMediaUri ( $ mediaUri ) ; if ( ! $ processedMedia ) { return false ; } //Send media file. $ result = $ this -> exec ( 'set_profile_photo ' . $ processedMedia [ 'filepath' ] ) ; //Clean up if media file came from REMOTE address $ this -> cleanUpMedia ( $ processedMedia ) ; return $ result ; }
Sets the profile picture for the logged in user

The photo will be cropped to square

@param string $mediaUri Either a URL or a local filename of the photo you wish to set

@uses     exec()
@return bool|string
Sets the profile picture for the logged in user