php - twitter api 1.1 statuses/user_timeline -


i had written original code 1.1 using abrhams twitteroauth , oauth.php in late 2012 , code using /1/ endpoint. worked fine in connect, authorized, long term token, updates , tweet... no problems.

when 1.0 sunsetted functionality broke (duh!) , took long time end on desk. first thing did change api /1/ /1.1/ , we're working... mostly... there problems:

problem 1: i'm authorizing, getting token etc. can login test account (@test1) , manually tweet, tweet picked via statuses/update , processed according our needs. if tweet directed specific user (@test2) statuses/update on test2 never detects incoming tweet although seen on twitter @ tab "interaction".

$twitter = new twitteroauth(consumer_key, consumer_secret,                              $access_token['oauth_token'], $access_token['oauth_token_secret']);  $params = array('screen_name' => $tw_name,                   'include_entities' => "true",                   'since_id ' => $tw_last);  $results = $twitter->get('statuses/user_timeline', $params);  

problem 2: when try tweet/reply (almost of tweets in_reply_to) on behalf of user post never returns apparently tweet gets sent (this may problem twitteroauth.php)

$twitter = new twitteroauth(consumer_key, consumer_secret,                              $access_token['oauth_token'], $access_token['oauth_token_secret']);  $user = $twitter->get('account/verify_credentials');  // build tweetback @address // might our own address lets see...  $message = "@" .$tweetback['tw_src'] ." $message";  // tweet reply       $tweet = array('status' => $message, 'in_reply_to_status_id' =>$tweetback['tw_topicid']);  // post tweet $response = $twitter->post('statuses/update', $tweet); 

any suggestions on how fix stuff?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -