Git Product home page Git Product logo

Comments (3)

khurshid-alam avatar khurshid-alam commented on July 19, 2024

Same thing happening here.

from tumblr.php.

markl181 avatar markl181 commented on July 19, 2024

I did a bit of testing on this. It looks like if you create a second instance of the API, then make a new request, you get an authentication error. It's nothing to do with the 'post' method. Most likely this is a restriction on the Tumblr side.

So for example, this produces the same error for me:

$client = new Tumblr\API\Client($consumerKey,$consumerSecret,$token,$tokenSecret);
$info = $client->getUserInfo();
echo "<br/><br/>congrats " . $info->user->name . "!"; 

$client2 = new Tumblr\API\Client($consumerKey, $consumerSecret, $token, $secret);
$info2 = $client2->getUserInfo();
echo "<br/><br/>more congrats " . $info2->user->name . "!"; 

Whereas this works fine:

$client = new Tumblr\API\Client($consumerKey,$consumerSecret,$token,$tokenSecret);
$info = $client->getUserInfo();
echo "<br/><br/>congrats " . $info->user->name . "!"; 

$info2 = $client->getUserInfo();
echo "<br/><br/>more congrats " . $info2->user->name . "!"; 

If you don't create a second instance, you should be ok.

from tumblr.php.

ceyko avatar ceyko commented on July 19, 2024

@andrewbecks It looks like your passing up parameters based on what Link Post responses look like. However, if you check the Link Post Creation docs, it actually requires a few different parameters.

Try making a request with these parameters:

$data = [
    'type' => 'link',
    'url' => 'http://www.yahoo.com',
    'description' => 'my sample tumblr post',
    'thumbnail' => 'https://i.ytimg.com/vi/m5d1FlSeF-M/maxresdefault.jpg',
    'author' => 'me',
]

Which will produce a post including these parameters:

        "link_image": "https://68.media.tumblr.com/d6ef4c3eb45e1920ea3c91c01870eaac/tumblr_oszjtpmuJC1s4ftbf_og_540.jpg",
        "link_image_dimensions": {
          "width": 540,
          "height": 304
        },
        "link_author": "me",
        "excerpt": null,
        "publisher": "yahoo.com",
        "description": "<p>my sample tumblr post</p>",

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.