Closed patelmegha887 closed 9 years ago
Did you install tumblr library through composer? If you did , then it shoud be include('vendor/autoload.php)'
.
If you didn't , then load the class by directly pointing to the 'tumblr.php'.
i directly put tumblr library in server folder didnt install through composer.. is it fine or not?
I think I need you to use a gist or something similar of what you've built. I think @khurshid-alam it's telling you that you'll need to require the tumblr.php file in the top of your script to load the actual client library.
sorry for late reply i tried lot i install composer but autoload file cant be generated...is there another way?
does we need to change composer,json file.... bcause when i install it it generate 4-5 autoload file i try to use every file still it dosent work
@patelmegha887
sorry for late reply i tried lot i install composer but autoload file cant be generated...is there another way?
Is it showing any error? Does it create vendor/tumblr
folder?
Which distro/OS & php version are you using? You should update composer first before doing anything. Try running php composer.phar update
first. For more command-line usage look here: https://getcomposer.org/doc/01-basic-usage.md
The commands I have given (above & below) works fine on Ubuntu(>=12.04) with php 5.5
Your composer.json
should look like this
{
"require": {
"tumblr/tumblr": "0.1.1"
}
}
First manually create the file, then run php composer.phar install
. It will generate a single autoload file inside vendor
.
i got this error when i run my file my code is here <?php session_start(); ini_set("display_errors", 1);
//include 'lib/Tumblr/API/Keys.php'; // I have created a new file Keys.php //It carries consumer-key, secret, token, token-secret $consumerKey = '-------------------------------'; $consumerSecret = '------------------------------------'; $token = '-----------------------------------------'; $tokenSecret = '-------------------------------------'; include 'vendor/autoloadManager.php';
use Tumblr\API;
$client = new Tumblr\API\Client($consumerKey, $consumerSecret);
//$token = $_SESSION['oauth_token']; //$tokenSecret = $_SESSION['oauth_token_secret'];
$client->setToken($token, $tokenSecret);
print '