Help me fix this (update status on twitter using php)!

by YongC
3 replies
  • WEB DESIGN
  • |
Hi guy !

I'm using this code to update status on twitter, i work fine at first time but now it not work ?

PHP Code:
    'xxx';
 = 
'xxx';
     = 
'xxx-xxx';
     = 
'xxx';

include 
"OAuth.php";
include 
"twitteroauth.php";

 = new 
TwitterOAuth(, , , );

(
'statuses/update',array('status' =>'My status here')) 



Thanks !
#fix
  • Profile picture of the author shaunvdp
    Try this...

    Try this...

    PHP Code:
    // here we want to send the article to twitter
    require_once('twitteroauth.php');
    // Twitter Connection Data
    tConsumerKey       'xxxx';
    tConsumerSecret    'xxxx';
    tAccessToken       'xxxx';
    tAccessTokenSecret 'xxxx';
     
    // start connection
    tweet = new TwitterOAuth($ tConsumerKey, $ tConsumerSecret, $ tAccessToken, $ tAccessTokenSecret);
     
    // the message
    message "This is an example twitter post using PHP";
     
    // send to twitter
    msg = $ tweet->post('statuses/update', array('status' => $ message)); 
    {{ DiscussionBoard.errors[8170048].message }}
    • Profile picture of the author shaunvdp
      Originally Posted by shaunvdp View Post

      Try this...

      Try this...

      PHP Code:
      // here we want to send the article to twitter
      require_once('twitteroauth.php');
      // Twitter Connection Data
      tConsumerKey       'xxxx';
      tConsumerSecret    'xxxx';
      tAccessToken       'xxxx';
      tAccessTokenSecret 'xxxx';
       
      // start connection
      tweet = new TwitterOAuth($ tConsumerKey, $ tConsumerSecret, $ tAccessToken, $ tAccessTokenSecret);
       
      // the message
      message "This is an example twitter post using PHP";
       
      // send to twitter
      msg = $ tweet->post('statuses/update', array('status' => $ message)); 
      Be sure to delete the space character I added between the dollar signs and variable names... System erases them if left unaltered...
      {{ DiscussionBoard.errors[8170068].message }}
  • Profile picture of the author YongC
    Thank for all support but i finally understand the problem, twitter rest api just update to v1.1 but i using v1
    {{ DiscussionBoard.errors[8171385].message }}

Trending Topics