1

Is there any way to upload photo on Twitter using xAuth or OAuth authentication in iPhone? Is there any sample code or framework I can use?

Moshe
  • 57,511
  • 78
  • 272
  • 425
Nikunj Jadav
  • 3,417
  • 7
  • 38
  • 54

3 Answers3

1

According to this answer it's not possible to upload images directly to Twitter. You need to yup load to some other photo-sharing site, and link to it in your Twitter post. I'd recommend looking into imgur. They have an API which you may be able to use.

Community
  • 1
  • 1
Moshe
  • 57,511
  • 78
  • 272
  • 425
0

It's very easy in iOS 5.

Just include the header file #import "Twitter/Twitter.h" and add the framework Twitter.framework in the project..

Then add the lines below for a button action:

TWTweetComposeViewController *tweeter =    [[TWTweetComposeViewController alloc] init];
[tweeter setInitialText:@"message"]; // for posting text
[tweeter addImage:image];            // for posting image
[self presentModalViewController:tweeter animated:YES];
Flexo
  • 87,323
  • 22
  • 191
  • 272
Rahul Nair
  • 381
  • 4
  • 14
0

Photo sharing uplaod feature is now available on Twitter, but there's no stable library for iphone yet released.

Adeel Pervaiz
  • 1,336
  • 10
  • 11