2011-09-06 3 views
0

다음의 방법을 사용하고 있지만 작동하지 않습니다.TwitterOauth를 사용한 직접적인 메시지

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

무엇을 작동하지 않는 이유는 무엇입니까? 함수는 무엇을 반환합니까? – arnaud576875

+0

Now 잘 작동하지만 메시지를 보내는 사용자를 따르는 사람들에게만 유효합니다. 어떤 사용자 에게든 메시지를 보내야합니다. 제안하십시오. –

+1

그건 불가능합니다. 소식을받는 사람에게만 직접 메시지를 보낼 수 있습니다. – arnaud576875

답변

0
$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); 
관련 문제