Git Product home page Git Product logo

Comments (5)

komapa avatar komapa commented on July 19, 2024

Which one is the tag? Or, what do you see when you go to https://www.tumblr.com/tagged/my-tag

from tumblr.php.

tomeralmog avatar tomeralmog commented on July 19, 2024

the tag can be any string I tag my posts with.

from tumblr.php.

komapa avatar komapa commented on July 19, 2024

I just wanted to make sure the tag has enough posts and is not some very low volume one. On this endpoint of the API we show posts up to the specified limit BUT only a maximum of 3 posts per blog. Because this is a blog agnostic endpoint, we did not want to fill the results with posts from only one blog. Does this explain the behavior you are seeing?

from tumblr.php.

tomeralmog avatar tomeralmog commented on July 19, 2024

I see.
Its ok, I decided to do it via curl and the regular api.
ie:
$oath = 'xxx';
$blogName = 'yyy.tumblr.com';
$tag='tagname';
$apiLink = "http://api.tumblr.com/v2/blog/$blogName/posts/?api_key=$oath&tag=$tag";

// Initializing curl
$ch = curl_init( $apiLink );

// Configuring curl options
$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array('Content-type: application/json') ,
);

// Setting curl options
curl_setopt_array( $ch, $options );

// Getting results
$result = curl_exec($ch); // Getting JSON result string

$data = json_decode($result);

from tumblr.php.

komapa avatar komapa commented on July 19, 2024

That works fine for what you are trying to achieve (get posts by tag for specific blog). Just note that you can still use the this PHP library to achieve the same (https://www.tumblr.com/docs/en/api/v2#posts)

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.