TwitterOAuth::post PHP Method

post() public method

POST wrapper for oAuthRequest.
public post ( $url, $parameters = [] )
    function post($url, $parameters = array())
    {
        $response = $this->oAuthRequest($url, 'POST', $parameters);
        if ($this->format === 'json' && $this->decode_json) {
            return json_decode($response);
        }
        return $response;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Adds a post to Twitter
  * 
  * @param string $question Question
  * @param string $tags     String of tags
  * @param string $link     URL to FAQ
  * 
  * @return void
  */
 public function addPost($question, $tags, $link)
 {
     $hashtags = '';
     if ($tags != '') {
         $hashtags = '#' . str_replace(',', ' #', $tags);
     }
     $message = PMF_String::htmlspecialchars($question);
     $message .= ' ' . $hashtags;
     $message .= ' ' . $link;
     $this->connection->post('statuses/update', array('status' => $message));
 }
All Usage Examples Of TwitterOAuth::post