MrSwitch/hello.js

Tumblr: GET works, but not POST

Open

#415 建立於 2016年4月3日

在 GitHub 查看
 (12 留言) (0 反應) (0 負責人)JavaScript (4,630 star) (557 fork)batch import
good first issuehelp wanted

描述

I'm trying to do a simple task: post a photo to my secondary Tumblr blog from a local page on 127.0.0.1. So far I've managed to log in and get the access token by using an OAuth proxy. All GET-related API requests work, but POST requests are failing. Here's my code:

hello('tumblr').api('blog/myblog.tumblr.com/post', 'post', {...}).then(function(r) {
  console.log(r);
});

Here's the response I'm getting:

{"meta":{"status":401,"msg":"Unauthorized"},"response":[]}

I'm hoping this is not a bug and I'm just missing a step (or two) -- please advise.

貢獻者指南

Tumblr: GET works, but not POST · MrSwitch/hello.js#415 | Good First Issue