Created
October 12, 2010 08:19
-
-
Save nobodyplace/621841 to your computer and use it in GitHub Desktop.
Services_Twitterを使ってダイレクトメッセージ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//PEAR::Services_Twitter | |
require_once 'Services/Twitter.php'; | |
//PEAR::HTTP_OAuth::Consumer | |
require_once 'HTTP/OAuth/Consumer.php'; | |
//instance | |
$twitter = new Services_Twitter(); | |
$oauth = new HTTP_OAuth_Consumer($consumerKey, $consumerSecret, $authToken, $authTokenSecret); | |
$twitter->setOAuth($oauth); | |
//send new direct message | |
$twitter->direct_messages->new($user, $message); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment