protected function unpublishedPhotos(array $sources)
    {
        $images = [];

        foreach ($sources as $index => $source) {
            $response = $this->fb
                ->post('/me/photos', [
                    'source' => new FacebookFile($source),
                    'published' => false,
                ])
                ->getDecodedBody();

            $images["attached_media[{$index}]"] = sprintf('{"media_fbid":"%d"}', $response['id']);
        }

        return $images;
    }
protected function unpublishedPhotos(array $sources)
    {
        $images = [];

        foreach ($sources as $index => $source) {
            $response = $this->fb
                ->post('/me/photos', [
                    'source' => new FacebookFile($source),
                    'published' => false,
                ])
                ->getDecodedBody();

            $images["attached_media[{$index}]"] = sprintf('{"media_fbid":"%d"}', $response['id']);
        }

        return $images;
    }
protected function unpublishedPhotos ( array $ sources ) { $ images = [ ] ; foreach ( $ sources as $ index => $ source ) { $ response = $ this -> fb -> post ( '/me/photos' , [ 'source' => new FacebookFile ( $ source ) , 'published' => false , ] ) -> getDecodedBody ( ) ; $ images [ "attached_media[{$index}]" ] = sprintf ( '{"media_fbid":"%d"}' , $ response [ 'id' ] ) ; } return $ images ; }
Create unpublished photos.

@param array $sources

@return array
Create unpublished photos .