Twitter api for iOS applications


#1

I m a newbie in iPhone development and my very first app is twitter based, so need to know about twitter api and how to use them in iPhone sdk…thnks


#2

I’m using Oauth library in ios…by creating Consumer key And Secret…See the link


#3

I am new here


#4

Can anyone help me to tweet picture. I knw how to add it in iOS5, but how to add it in below versions?


#5

I am facing same issue so anyone help me


#6

please look it up in youtube, its tons of nice videos about this specific concerns!


#7

hi ,

i want to implement twitter application in my own iphone application . please suggest me how can i use rest API for this.


#8

I would use MGTwitterEngine. Get the original one from Matt Gemmel.

Depending on your needs, use SA_OAuthTwitterEngine (OAuth) or XAuthTwitterEngine (XAuth). They are MGTwitterEngine subclasses that add OAuth functionality.


#9

After giving username and password in iphone app redirect to page with title select copy and pin
What to do ?
can any body help me


#10

can we post video on wall using iphone sdk


#11

I am using MGTwitterEngine for twitter api and i can post my tweet using this but can not fetch user timeline so can you help me for this problem??


#12

HI… How to integrate twitter in my iPhone App support target iOS 4.3.
In iOS 5 it work fine with


#13

How can I get the Twitter following and follower Email id and MobileNo in the iPhone sdk Using MGTwitterEngine?
1 down vote favorite

I’m unable to get the Twitter following and Followers Email id and MobileNo i am using below code for that using below code i am able to get only Twitter following name and Id Please help?

if([[NSUserDefaults standardUserDefaults] valueForKey:@“UseridLoop”]==nil)
{
urlString = [NSString stringWithFormat:@“https://api.twitter.com/1/friends/ids.json?cursor=-1&user_id=%@”,[[NSUserDefaults standardUserDefaults] valueForKey:@“Userid”]];
}
else
{
urlString = [NSString stringWithFormat:@“https://api.twitter.com/1/followers/ids.json?cursor=-1&user_id=%@”,[[NSUserDefaults standardUserDefaults] valueForKey:@“UseridLoop”]];
}

NSURLRequest *notificationRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
NSHTTPURLResponse *response;
NSError *error;
NSData *responData;

responData = [NSURLConnection sendSynchronousRequest:notificationRequest returningResponse:&response error:&error];
NSLog(@"%@",responData);
NSString *dataString = [[NSString alloc] initWithData:responData encoding:NSUTF8StringEncoding];

// NSDictionary *dict = [[NSDictionary alloc] initWithDictionary:(NSDictionary *)[dataString JSONValue]];
// // NSMutableDictionary *globalCelebDict=[[NSMutableDictionary alloc]initWithDictionary:(NSMutableDictionary *)[dataString JSONValue ] ];
// //NSMutableDictionary *globalCelebDictNext=[[NSMutableDictionary alloc]initWithDictionary:(NSMutableDictionary *)[[ globalCelebDict objectForKey:@“GetGroupDetailsResult”] JSONValue]];
// NSLog(@“dict %@”,dict);

SBJSON *json = [[SBJSON alloc] init];
NSMutableDictionary *customDetailDict=[[NSMutableDictionary alloc]init];
customDetailDict=[json objectWithString:dataString error:&error];
// NSDictionary *customDetailDict = [json objectWithString:dataString error:&error];
NSLog(@"%@",customDetailDict);
if (customDetailDict!=nil) {
array=[[customDetailDict objectForKey:@“ids”]retain];
NSLog(@"%@",array);


#14

How to get user first nam, last name from twitter api, If any one know about it please share your views.

Thanks


#15

Hi, How to upload video using twitvid ??
Thanks


#16

i want to get tweets of selected friends use friends id in iphone application.


#17

i want to send tweets of selected friends in iphone application.


#18

I was running in to same issue and I found this solution. May be this will help you.

[[Twitter sharedInstance] logInWithCompletion:^(TWTRSession *session, NSError *error) {
        if (session)
        {
            self.lblHeading.text = [session userName];
            
            /* Get user info */
            [[[Twitter sharedInstance] APIClient] loadUserWithID:[session userID]
                                                      completion:^(TWTRUser *user,
                                                                   NSError *error)
             {
                 // handle the response or error
                 if (![error isEqual:nil])
                 {
                     self.lblHeading.text = user.name;
                     
                     NSString *urlString = [[NSString alloc] initWithString:user.profileImageLargeURL];
                     NSURL *url = [[NSURL alloc]initWithString:urlString];
                     NSData *pullTwitterPP = [[NSData alloc] initWithContentsOfURL:url];
                     
                     UIImage *image = [UIImage imageWithData:pullTwitterPP];
                     
                     self.twitterProfileImageView.image = image;
                     
                     
                 }
                 else
                 {
                     NSLog(@"Twitter error getting profile : %@", [error localizedDescription]);
                 }
             }];
        }
        else
        {
            self.lblHeading.text = @"Twitter";
        }
    }];

#19