tags:

views:

33

answers:

1

alt text

HI all, can we post images with tweets in twittter through code in iphone???? Check the screen shots

I am using busyAgent.this helps me to tweet wiothout posting images, i need to send images to at the time of tweeting

Guidence regards

alt text

A: 

You will need to use a few APIs for this (for what I think you are trying to do?)

  • The Twitter API For posting a tweet
  • An API of many of the popular twitter image hosting/sharing websites, for example The Twitpic API
    • This will allow you to upload the image to their site (through code) and get a URL in return, containing the location of your uploaded image

Then you just need to do something like

  • Upload your image using the api of your image sharing site and storing the URL somewhere
  • Formulate your tweet message with the URL in it
  • Use the Twitter API to connect to your account (or whoever is using your application and has supplied their login credentials)
  • Post the tweet
djhworld
Thanks djhworld,i can tweet through my code, its running absolutely fine.i just need to knw how can i also send images to twitter.regards
shishir.bobby
shishir - What I'm saying should allow you to do this. Unless I'm out of touch (things move really fast these days!) I don't think Twitter hosts any images, they partner up with image hosting sites insteadTwitpic is one of them, you send them an image, they do a bit of processing and return a URL telling you where that image is. Then all you need to do is post your tweet with the URL in it.e.g. "This is my cat http://<twitpic-URL>"
djhworld
actually, from the looks of it the Twitpic API allows you to upload the image and post a tweet at the same time, so that's killing two birds with one stone there!
djhworld