diff --git a/src/cocoatweet/api/status/update.cc b/src/cocoatweet/api/status/update.cc index 5d689e1..bc36ae4 100644 --- a/src/cocoatweet/api/status/update.cc +++ b/src/cocoatweet/api/status/update.cc @@ -53,7 +53,7 @@ void Update::process(std::weak_ptr _oauth, { std::vector tmp; for (const auto& [key, value] : oauthParam) { - tmp.push_back(key + "=" + value); + tmp.push_back(key + "=" + CocoaTweet::Util::urlEncode(value)); } std::stringstream os; std::copy(tmp.begin(), tmp.end(), std::ostream_iterator(os, ",")); diff --git a/src/cocoatweet/oauth/oauth.cc b/src/cocoatweet/oauth/oauth.cc index 2331b0c..6ac8217 100644 --- a/src/cocoatweet/oauth/oauth.cc +++ b/src/cocoatweet/oauth/oauth.cc @@ -43,7 +43,7 @@ std::map OAuth1::signature( std::cout << "hmac-sha1 : " << k64Sha1 << std::endl; auto ret = std::map{ - {"oauth_signature", CocoaTweet::Util::urlEncode(k64Sha1)}}; + {"oauth_signature", k64Sha1}}; return ret; }