0
votes

I followed the composer instructions and installed composer successfully. I want to use tumblr's brand new php api client.

My folder structure:

vendor/
composer.json
composer.lock
myfile.php

composer.json:

{
    "require": {
        "tumblr/tumblr": "0.0.2"
    }
}

myfile.php:

require 'vendor/autoload.php';
$client = new Tumblr\API\Client(CONSUMER_KEY, CONSUMER_SECRET);

Installing using php composer.phar install works great as well. But when executing myfile.php the class could not be found.

Fatal error: Class 'Tumblr\API\Client' not found in [..]/htdocs/tumblr/myfile.php on line 9

1
That's because they messed up their autoload definition. I've sent a pull request to fix it: github.com/tumblr/tumblr.php/pull/1igorw
You marked this issue as an enhancement on github. Is there a workaround to this problem?user28061
not sure what you mean, but it's been merged now, so a composer update should fix the problem.igorw

1 Answers

1
votes

A new version of tumblr.php has been released which fixes the issue. Thanks to @igorw.