0

I'm kind of new on objective c, and I'm trying to do a twitter client. I'm using the STTwitter API. I'm using the for tweeting the method :

[twitter postStatusUpdate:twitterPostTweetText
               inReplyToStatusID:nil
                        mediaURL:_twitterPostMediaURL
                         placeID:nil
                        latitude:latitud
                       longitude:longitud
                    successBlock:^(NSDictionary *status) {

                        self->twitterPostTweetText = @"";
                        self->twitterPostTweetStatus = @"OK";
                        self->latitud = nil;
                        self->longitud = nil;
                        self.twitterPostMediaURL = nil;
                    } errorBlock:^(NSError *error) {
                        self->twitterPostTweetStatus = error ? [error localizedDescription] : @"Unknown error";
                    }];

but it says that for sending an image attached I have to use NSUrl but I can't figure out how does it work. I want to send an image that I take with the camera roll. Please, any ideas?

rgettman
  • 176,041
  • 30
  • 275
  • 357
user2984254
  • 109
  • 1
  • 7

1 Answers1

0

Use an NSURL instance representing the file path.

See the example in STTwitter demo https://github.com/nst/STTwitter/blob/master/demo_osx/STTwitterDemoOSX/STClientVC.m#L33-L48

nst
  • 3,862
  • 1
  • 31
  • 40