Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 984431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:00:51+00:00 2026-05-16T05:00:51+00:00

Ive cracked oAuth and have my class file for it. I’m at the last

  • 0

Ive cracked oAuth and have my class file for it. I’m at the last stage of posting a tweet and all works except all the words are joined with a plus sign in the tweet.

Changing anything results in the signature been incorrect and twitter returns 401 error.

So how does one remove the pluses? Post function below:

function post($token, $tokenSecret, $status)
{
    // Default params
    $params = array(
        "oauth_version" => "1.0",
        "oauth_nonce" => time(),
        "oauth_timestamp" => time(),
        "oauth_consumer_key" => $this->key,
        "oauth_signature_method" => "HMAC-SHA1",
        "oauth_token" => $token,
        "status" => $status
     );
    uksort($params, 'strcmp');

    // convert params to string 
        foreach ($params as $k => $v) {$pairs[] = $this->_urlencode_rfc3986($k).'='.$this->_urlencode_rfc3986($v);}
        $concatenatedParams = implode('&', $pairs);

        // form base string (first key)
        $baseString= "POST&".$this->_urlencode_rfc3986($this->request_statuses_url)."&".$this->_urlencode_rfc3986($concatenatedParams);
        // form secret (second key)
        $secret = $this->_urlencode_rfc3986($this->secret)."&".$this->_urlencode_rfc3986($tokenSecret);
        // make signature
        $sig = $this->_urlencode_rfc3986(base64_encode(hash_hmac('sha1', $baseString, $secret, TRUE)));

     // BUILD URL
        $url = $this->request_statuses_url; // twitter update url
        $paramString = $concatenatedParams."&oauth_signature=".$sig;

     // Send to cURL
     $result = $this->_http($url, $paramString);

     if($result['httpCode'] == '200'){

        // Return array
        return $result;
    }
    else{

        // Error
        show_error($result['httpCode'], $result['httpCode']);
        return FALSE;
    }       
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:00:52+00:00Added an answer on May 16, 2026 at 5:00 am

    Twitter is not supporting “+” as escape for spaces, which as far as I know is a violation of the standard.

    You have to replace the the + with %20.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ive got an mde file and all i need is to get data from
Ive created a function which returns all the obserables items in my html page.
Ive been on google all morning and here on SO. The problem im having
Okay, Ive got a cog (toothed gear) that I have drawn in opengl. I
Ive got Dymo labelwriter 400. It works like a charm with a glabels on
I've just cracked my install.log file(s) for the first time and I could use
this one is driving me nuts. And last week i thougt i cracked the
I have a nested html structure like this: <ul class=root> <li>Foo 1 <label class=bar-class>bar</label>
Ive been wondering... in CSS are there any differences between creating a style class
I've been following RailsCast 197 to try this nested models/forms and have cracked my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.