Git Product home page Git Product logo

Comments (11)

seejohnrun avatar seejohnrun commented on July 19, 2024

You can install them manually, and will need to require each of the dependencies (listed in composer.json) before requiring the tumblr library. It's much easier and advised to use composer, but if you don't want to for whatever reason - you don't have to. You should be able to put the files anywhere as long as you include them in the right order. Keep in mind, though, that the dependencies have their own dependencies as well. You'll need the right versions, required in the right order. That's the magic of a package manager like composer or sparks

from tumblr.php.

seejohnrun avatar seejohnrun commented on July 19, 2024

Re-open with any questions - thank you!

from tumblr.php.

mase857 avatar mase857 commented on July 19, 2024

I don't see the Eher classes on here ... and yes there are many dependencies ... I tried to use the composer but for some reason curl is not working on my windows computer , I mentioned that in my post above ... I didn't say that I don't want to use it , I have issues using curl on my computer . Is there a way for me to get all the classes together manually ? I don't see the Eher classes on here ... I only see the API folder ... Thanks

from tumblr.php.

seejohnrun avatar seejohnrun commented on July 19, 2024

The Eher classes come from a dependency https://github.com/EHER/OAuth which if you're having issues with composer you'll need to download and also link in from your script (before tumblr.php).

It may be easier for you to figure out your curl issues with composer - it's going to be hard to maintain if you download the dependencies manually.

from tumblr.php.

mase857 avatar mase857 commented on July 19, 2024

So if I have a hard time with curl on my computer , should I just download the Eher folder and place it in the API folder which is in the Tumblr folder ? I'll do my best to figure out why curl won't work in my command line .. Thanks

from tumblr.php.

seejohnrun avatar seejohnrun commented on July 19, 2024

not in the API folder - i'd put it somewhere alongside the tumblr api, and then from the outside you'd want to require('some/path/to/eher.php') and then require('some/other/path/to/tumblr.php');

from tumblr.php.

mase857 avatar mase857 commented on July 19, 2024

Thanks for the quick support , I'll retry curl on another computer .... If I have any other question , I'll just post it on here

from tumblr.php.

seejohnrun avatar seejohnrun commented on July 19, 2024

cool - thanks

from tumblr.php.

mase857 avatar mase857 commented on July 19, 2024

Ok , so I was able to install the vendor folder and include the autoload.php .. Below is the script is the authentication script, but I get this error Fatal error: Class 'Tumblr\API\Client' not found in /home/content/72/9959172/html/ even though I have the client.php class in the API folder ... what's wrong ?? This has been giving such a hard time and it should be pretty easy ... I read somewhere that it could be due to the fact that it's outdated .. I dont know

require_once('vendor/autoload.php');

// some variables that will be pretttty useful
$consumerKey = 'xxxxxxxxxxxxxx';
$consumerSecret = 'xxxxxxxxxxxxxxxxxx';
$client = new Tumblr\API\Client($consumerKey, $consumerSecret);
$requestHandler = $client->getRequestHandler();
$requestHandler->setBaseUrl('https://www.tumblr.com/');

// start the old gal up
$resp = $requestHandler->request('POST', 'oauth/request_token', array());

// get the oauth_token
$out = $result = $resp->body;
$data = array();
parse_str($out, $data);

// tell the user where to go
echo 'https://www.tumblr.com/oauth/authorize?oauth_token=' . $data['oauth_token'];
$client->setToken($data['oauth_token'], $data['oauth_token_secret']);

// get the verifier (will be in URL that the user comes back to)
echo "\noauth_verifier: ";
$handle = fopen('php://stdin', 'r');
$line = fgets($handle);

// exchange the verifier for the keys
$verifier = trim($line);
$resp = $requestHandler->request('POST', 'oauth/access_token', array('oauth_verifier' => $verifier));
$out = $result = $resp->body;
$data = array();
parse_str($out, $data);

// and print out our new keys
$token = $data['oauth_token'];
$secret = $data['oauth_token_secret'];
echo "\ntoken: " . $token . "\nsecret: " . $secret;

// and prove we're in the money
$client = new Tumblr\API\Client($consumerKey, $consumerSecret, $token, $secret);
$info = $client->getUserInfo();
echo "\ncongrats " . $info->user->name . "!\n";

from tumblr.php.

seejohnrun avatar seejohnrun commented on July 19, 2024

@mase857 I see the tickets when you open them separately :) No need to duplicate here

from tumblr.php.

earth-tone avatar earth-tone commented on July 19, 2024

I don't see an Eher class anywhere in this project? I have the same error.

from tumblr.php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.