问题描述:

I'm an absolute Tumblr novice and am trying to create a list of posts based on a tag.

To clarify I'm NOT trying to simply create a "Tag Page" as I see there are MILLIONS of posts about. I'm trying to create a custom page within Tumblr that has my own HTML / CSS content and then below that all posts associated with a certain Tag.

Any help is appreciated, Thanks in advance!!!

网友答案:

Have a look into the documentation here: https://www.tumblr.com/docs/en/api/v2#posts

Your API query will look like that:

api.tumblr.com/v2/blog/{base-hostname}/posts?api_key={key}&tag={tag}&limit=7

You need to replace those parameters:

  • {base-hostname} - The blog you want to query (https://www.tumblr.com/docs/en/api/v2#hostname)
  • {key} - Your API-Key (https://www.tumblr.com/docs/en/api/v2#auth).
  • {tag} - Fill in your tag name here.

Note: Depending on the programming language you are using, you could use one of the official clients that will do most of the work for you: https://www.tumblr.com/docs/en/api/v2#clients

相关阅读:
Top