Post a tweet Programatically - Custom TWTRComposer (iOS)


#1

Hi, I have my own pop over view for posting comments with several social networks to choose (twitter, facebook, g+) and I’m having some issues with fabric twitter-kit since it provides an all-in-one solution for posting twitters.

I can compose the tweet programatically with TWTRComposer but this class does not provide a method to send this tweet programatically (since all the action happens in my custom pop over) I just want to send the tweet, not presenting a new view over my pop over!

Is there a way to customize this TWTRComposer so I can post the tweet in my own pop over??


#2

Can’t you just use the TWTRAPICLient?

    TWTRAPIClient *client = [[Twitter sharedInstance] APIClient];
    
    NSURLRequest *preparedRequest = [client URLRequestWithMethod:SLRequestMethodToString(method) URL:url parameters:parameters error:&error];

[client sendTwitterRequest:request completion:completion];

Method:

POST

url:

@"https://api.twitter.com/1.1/statuses/update.json"

parameters:

NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
[parameters setObject:replyMessage forKey:@"status"];
[parameters setObject:[tweet statusId] forKey:@"in_reply_to_status_id"];

for adding a reply to a tweet or to create a new tweet
https://dev.twitter.com/rest/reference/post/statuses/update


#3