twitter - How to connect to twitpic API with PHP? -



twitter - How to connect to twitpic API with PHP? -

i can't connect twitpic api. i've tried this:

$post = array ( 'key' => 'fghgfhdfghf', 'consumer_token' => 'retert', 'consumer_secret' => 'ertertwerwtetey', 'oauth_token' => 'wety43y4y4wy', 'oauth_secret' => 'seryeryereshrh', 'message' => 'ffff', 'media' => file_get_contents('http://img.yandex.net/i/www/logo.png') ); $ch = curl_init(); curl_setopt($ch, curlopt_url, 'http://api.twitpic.com/1/upload.json'); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_ssl_verifypeer, 0); curl_setopt($ch, curlopt_post, true); curl_setopt($ch, curlopt_verbose, true); curl_setopt($ch, curlopt_postfields, $post); $response = curl_exec($ch); echo $errno = curl_errno($ch); curl_close ($ch); echo $response;

what's wrong code? can give me illustration of how working?

"file_get_contents" not allways enabled on server

php twitter

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -