How to tweet a post with weblink to the twitter followers screen?
ajay2c9 opened this issue · 1 comments
ajay2c9 commented
Hi,
How to tweet a post with web url and text on twitter followers page without using dialog using objective-c.
Please give suggestions
Thank you
nst commented
// 1. authenticate the way you want
STTwitterAPI *t = [STTwitterAPI twitterAPIWithOAuthConsumerKey:@""
consumerSecret:@""
username:@""
password:@""];
[t verifyCredentialsWithUserSuccessBlock:^(NSString *username, NSString *userID) {
NSLog(@"-- %@, %@", username, userID);
// 2. post your status
[_twitter postStatusUpdate:@"hello"
inReplyToStatusID:nil
mediaURL:nil
placeID:nil
latitude:nil
longitude:nil
uploadProgressBlock:^(int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite) {
// ...
} successBlock:^(NSDictionary *status) {
// ...
} errorBlock:^(NSError *error) {
// ...
}];
} errorBlock:^(NSError *error) {
NSLog(@"-- %@", error);
}];