0

I am able to get user name and its profile image of twitter in my app.Here is my code

  - (void) OAuthTwitterController: (SA_OAuthTwitterController *) controller authenticatedWithUsername: (NSString *) username {

    NSLog(@"Authenticated with user %@", username);

    imageview.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:
                                                                            [NSString stringWithFormat:@"http://api.twitter.com/1/users/profile_image/%@.json",username]]]];



    NSLog(@"http://api.twitter.com/1/users/profile_image/username.json");

    recentTweets = [[NSMutableArray alloc] init];
    [self updateStream:nil];
}

Now I want to get logged in user's profile image...any one knows about this?

Saurabh
  • 22,743
  • 12
  • 84
  • 133
Abhishek
  • 303
  • 1
  • 6
  • 25

1 Answers1

0

I am sure you have gotten this already but if not I can maybe help.

depending on how you want the image to show but I assume you are making a view with a IBOutlet to a UIImage to place a users profile image on that specific page. To do so you already have most of the code

mainAvatar.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL U       RLWithString:@"http:// Place your JSON here" ]]];     

then make the IBOutlet within the View you want it to appear on and connect it up and you should be all good. Just place that in a ViewDidLoad Method so when your page loads so wont your image..... Now Tell me how you placed that profile image in a table cell and were even! HA I am getting them to download but for some reason they wont load in the table view

FreeAppl3
  • 858
  • 1
  • 15
  • 32