简体   繁体   English

将图片(带有说明)上传到Tumblr

[英]Upload an Image (with description) to Tumblr

so I want to have a .php script that uploads an image every 3 hours to my Tumblr (via a cronjob). 所以我想有一个.php脚本,该脚本每3小时将图片上传到我的Tumblr(通过cronjob)。 I used to have a working script, however since Tumblr no longer supports their v1 API I am lost. 我曾经有一个工作脚本,但是由于Tumblr不再支持其v1 API,我迷路了。 I have found no good guides on Google (http://vigrond.com/blog/2012/02/04/oauth-extension-php-and-the-tumblr-api/ doesn't do it for me since I can't install the OAuth extension) and the official Tumblr Documentation doesn't even exist. 我在Google上找不到很好的指南(http://vigrond.com/blog/2012/02/04/oauth-extension-php-and-the-tumblr-api/对我没有帮助,因为我可以请安装OAuth扩展程序),甚至不存在官方的Tumblr文档。

I would be very glad if you can help me out and point me to a solution :) 如果您能帮助我并指出解决方案,我将非常高兴:)

I've found this would be a good start: https://gist.github.com/1649885 but I cannot seem to get the access_token / access_secret. 我发现这将是一个不错的开始: https : //gist.github.com/1649885但我似乎无法获取access_token / access_secret。

I've done a simple script that posts a random image, taken from a random category, each category has its own tags and captions file, so for every image posted, you can have several captions. 我已经完成了一个简单的脚本,该脚本发布了一个随机图像,该图像取自一个随机类别,每个类别都有自己的标记和标题文件,因此对于每个发布的图像,您都可以具有多个标题。

the script is using the tumblr api v2. 该脚本正在使用tumblr api v2。

matteobononi.it tumblr random image post script matteobononi.it tumblr随机图片发布脚本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM