Created
June 11, 2009 03:44
-
-
Save jmathai/127690 to your computer and use it in GitHub Desktop.
Upload photos to Twitter's OAuth API using PHP
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
// This uses twitter-async from GitHub | |
// Source: https://github.com/jmathai/twitter-async/tree | |
// Documentation: http://wiki.github.com/jmathai/twitter-async | |
include 'EpiOAuth.php'; | |
include 'EpiTwitter.php'; | |
$twitterObj = new EpiTwitter('YourConsumerKey', 'YourConsumerSecret', 'Token', 'TokenSecret'); | |
$params = array('@image' => '@/absolute/path/to/image.jpg'); | |
$uploadResp = $twitterObj->post_accountUpdate_profile_image($params); | |
echo $uploadResp->responseText; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you want to tweet images using twitter api you can check our blog to see all the steps and download the example:
http://www.stirring-interactive.com/blog/tweet-images-using-twitter-api/