php - Why are there pluses ( + ) in my oAuth tweets? -
I oAuth has broken and my class file is for this I am the last of posting a tweet I am in step and all words are added with a plus sign in tweets.
Changing some results in the signature is wrong and Twitter gives 401 error
So how does one remove the Plus? Post Function:
function post ($ token, $ token sync, $ position) {// default parameter $ params = array ("oauth_version" => "1.0", "oauth_nonce" = & Quot; $ o- "status" = & gt; $ position); Uksort ($ params, 'strcmp'); // Forex Currency ($$ k => $ v) $ $ [$ pairs]] = $ this- & gt; Convert the parameter as _urlencode_rfc3986 ($ k). '='. $ This- & gt; _urlencode_rfc3986 ($ v);} $ ConcatenatedParams = implode ('& amp;', $ added); // Form Base String (First Key) $ BaseString = "Post" and "$$" - $ _- $ _ ($ this- & request_statuses_url) "& Amp;". $ This- & gt; _urlencode_rfc3986 ($ concatenatedParam); // form secret (second key) $ secret = $ it- & gt; _urlencode_rfc3986 ($ this- & gt; secret). "& Amp;". $ This- & gt; _urlencode_rfc3986 ($ token secret); // create sign $ sig = $ this- & gt; _urlencode_rfc3986 (base64_encode (hash_hammak ('sha1', $ basestring, $ secret, true))); // build url $ url = $ this- & gt; Request_stats_url; // Twitter Update URL $ Parameters = $ Contemporary Perm. "& Oauth_signature =". $ Sig; // curl $ result = $ this-> Send _http ($ url, $ paramString); If ($ result ['httpCode'] == '200') {// return array return result $; } Else {// error show_error ($ result ['httpCode'], $ result ['httpCode']); return false; +}
Twitter does not support "+" as a escape for the blank That is, that till now I know that the standard is a violation.
Change you with + 20%.
Comments
Post a Comment