прямое сообщение с использованием TwitterOauth - PullRequest
0 голосов
/ 06 сентября 2011

Я использую следующий метод, но он не работает.

$twitteroauth->post('direct_messages/new', array(
    'text' => 'dm text here',
    'screen_name' => 'recipients screen_name',
));

1 Ответ

0 голосов
/ 19 августа 2013
$twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, 
                            $access_token['oauth_token'], $access_token['oauth_token_secret']);

// $message must have the @name of the user who created the message 
// referenced in the 'in_reply_to_status_id' field
$tweet = array('status' => $message,
               'in_reply_to_status_id' =>$tweetback['tw_topicid']); 

// post the tweet
$response = $twitter->post('statuses/update', $tweet);
...