mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #293] POSTing a text blog to Tumblr #174
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#174
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @idelfonsog2 on GitHub (Oct 18, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/293
Description:
Hi @phimage Im having the same issues and I get this as a response:
Response-Body=Optional("{\"meta\":{\"status\":400,\"msg\":\"Bad Request\"},\"response\":{\"errors\":[\"Post cannot be empty.\"]}}")}]my code is the following
(TMClient.sharedInstance().tumblrURL(withPathExtension: Methods.PostText) is essentially this:
URL: https://api.tumblr.com/v2/blog/idelfonsog2.tumblr.com/post
you can also see it below
OAuth Provider (Twitter, Github, ..):
Tumblr
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
@phimage commented on GitHub (Oct 18, 2016):
I think the OAuthSwiftError is not fully pasted here (but I can see before the "Post cannot be empty.")
I think you can try to remove the "headers" variable. I think it's for GET request, to specify the format you want in response
Then could you post the content of "parameters"?
Maybe the text is not well formatted, and be encoded before passing to client...
@idelfonsog2 commented on GitHub (Oct 18, 2016):
Thanks @phimage let me try that!
the contents of ParameterValues.MarkdownType == "markdown"
@idelfonsog2 commented on GitHub (Oct 18, 2016):
Also, where should I include the "Title" and "Body text" in my request? essentially I'm trying to publish a new post in Tumblr
@phimage commented on GitHub (Oct 18, 2016):
parametersis a good place to add that, that why I ask you to past yours heredo not miss "type"
it will be encoded to "application/x-www-form-urlencoded"
@idelfonsog2 commented on GitHub (Oct 18, 2016):
Huge Thanks!!!!!! 🙇
that definitely worked!!!!
final code was: //future reference or help for anybody