benoît
benoît

Reputation: 1483

create a photoset with tumblr api v2

I use this php : https://github.com/tumblr/tumblr.php to create a post with a photo, tags and caption.

$client = new Tumblr\API\Client(/*my keys*/);

$data = ['type'     =>  "photo",
             'tags'     =>  "test2, soir",
             'source'   =>  "https://www.google.fr/images/srpr/logo11w.png"];
$client->createPost($blogName, $data);

Now I want to upload more than one photo to make a photoset ; so I try

'source'    =>  ["https://www.google.fr/images","/* img url */","/* … */"]

Photosets is a new feature of Tumblr API, v2 http://engineering.tumblr.com/post/7541361718/introducing-tumblrs-new-api but I don't find any sample of this feature…

Upvotes: 1

Views: 671

Answers (1)

benoît
benoît

Reputation: 1483

Finally, it's work!

$data['data'] = ["1.jpg","2.jpg"]; is ok

$data['data'] = ["1.jpg","http://path/to/2.jpg"]; is not ok

Upvotes: 1

Related Questions