-1

I am able to post text from iphone to twitter with [_engine sendUpdate:[textfield text]];

But I have to post an image. Can anyone guide me?

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
Sheik
  • 41
  • 2
  • 5

2 Answers2

1

MGTwitter engine doesnt support image uploading, but you could either use this: https://github.com/Gurpartap/GSTwitPicEngine

or integrate that into MGTwitter engine.

Also, please state more information about what library you are using so that people can help YOU. People cannot help you if they have no idea about what you are referring to. It is only since I knew the API you are calling that I could help you.

Craig White
  • 13,492
  • 4
  • 23
  • 36
  • I was referring to library you are using. – Craig White Jun 27 '11 at 06:13
  • I too have to post the local image to twitter which I have attached to view statically. – Sheik Jun 27 '11 at 06:18
  • Am using the library Twitter+OAuth – Sheik Jun 27 '11 at 06:48
  • - (void)viewDidLoad { [super viewDidLoad]; self.title = @"Causes"; if(_engine) return; _engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self]; _engine.consumerKey = @"PzkZj9g57ah2bcB58mD4Q"; _engine.consumerSecret = @"OvogWpara8xybjMUDGcLklOeZSF12xnYHLE37rel2g"; UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine: _engine delegate: self]; if (controller) [self presentModalViewController: controller animated: YES]; else { tweets = [[NSMutableArray alloc] init]; [self updateStream:nil]; } } – Sheik Jun 27 '11 at 06:52
  • if ([NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error] != nil) NSLog(@"Posted to Twitter successfully."); else NSLog(@"Error posting to Twitter."); [textfield resignFirstResponder]; [_engine sendUpdate:[textfield text]]; [self updateStream:nil]; – Sheik Jun 27 '11 at 06:57
-1

For upload image you should use TwitPic. and use check this

Thanks

Mitesh Khatri
  • 3,935
  • 4
  • 44
  • 67