Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7703867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:33:24+00:00 2026-05-31T23:33:24+00:00

Im trying to follow a tutorial that is using SBJsonParser to get twitter feeds,

  • 0

Im trying to follow a tutorial that is using SBJsonParser to get twitter feeds, and displays them in a table view.

But i am getting the following error

[__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6b7e510

this is whats in my

@interface NSString *json_string; NSArray *statusArray;

This is the code im using to get the twitter feed

`SBJsonParser *parser = [[SBJsonParser alloc] init];

    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://twitter.com/statuses/public_timeline.json"]];

NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];


json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];

statusArray = [parser objectWithString:json_string error:nil];`

And this is what im using to put it into a table view

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return statusArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];


cell.textLabel.text = [[statusArray objectAtIndex:indexPath.row] objectForKey:@"user"];

return cell;
}

EDIT:

I NSLogged statusArray with objectatindex:0 and i got

 {
contributors = "<null>";
coordinates = "<null>";
"created_at" = "Mon Mar 26 19:43:54 +0000 2012";
favorited = 0;
geo = "<null>";
id = 184365079062528000;
"id_str" = 184365079062528000;
"in_reply_to_screen_name" = "<null>";
"in_reply_to_status_id" = "<null>";
"in_reply_to_status_id_str" = "<null>";
"in_reply_to_user_id" = "<null>";
"in_reply_to_user_id_str" = "<null>";
place = "<null>";
"retweet_count" = 0;
retweeted = 0;
source = "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\U00ae</a>";
text = "Kalau tidur jam segini engga mungkin bisa mimpi-___-";
truncated = 0;
user =     {
    "contributors_enabled" = 0;
    "created_at" = "Tue Apr 27 18:28:24 +0000 2010";
    "default_profile" = 0;
    "default_profile_image" = 0;
    description = "27June!";
    "favourites_count" = 0;
    "follow_request_sent" = "<null>";
    "followers_count" = 733;
    following = "<null>";
    "friends_count" = 331;
    "geo_enabled" = 1;
    id = 137772903;
    "id_str" = 137772903;
    "is_translator" = 0;
    lang = en;
    "listed_count" = 0;
    location = "";
    name = "Faisal Maulana \U2606";
    notifications = "<null>";
    "profile_background_color" = 050505;
    "profile_background_image_url" = "http://a0.twimg.com/profile_background_images/451260814/428031_258048570950875_100002372012794_560610_1320195241_n.jpg";
    "profile_background_image_url_https" = "https://si0.twimg.com/profile_background_images/451260814/428031_258048570950875_100002372012794_560610_1320195241_n.jpg";
    "profile_background_tile" = 1;
    "profile_image_url" = "http://a0.twimg.com/profile_images/1962687246/IMG01822-20120319-1126_normal.jpg";
    "profile_image_url_https" = "https://si0.twimg.com/profile_images/1962687246/IMG01822-20120319-1126_normal.jpg";
    "profile_link_color" = 0a0a0a;
    "profile_sidebar_border_color" = 161717;
    "profile_sidebar_fill_color" = ffffff;
    "profile_text_color" = 050505;
    "profile_use_background_image" = 1;
    protected = 0;
    "screen_name" = IcalHuba;
    "show_all_inline_media" = 0;
    "statuses_count" = 60850;
    "time_zone" = Greenland;
    url = "<null>";
    "utc_offset" = "-10800";
    verified = 0;
};

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:33:25+00:00Added an answer on May 31, 2026 at 11:33 pm

    Lets assume your json parser is bug free.

    -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {    
            return 1
    }
    
    -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
     {
            return statusArray.count;
     }
    
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:              (NSIndexPath *)indexPath
    {
            UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
    
            //note: valueForKeyPath return nil, if key does not find
            NSString *userInfo = [[statusArray objectAtIndex:indexPath.row] valueForKeyPath:@"user.name"]; // or valueForKeyPath:@"user.screen_name"
    
            if ([userInfo isEqualToString=@""] || [userInfo length]<0])
                cell.textLabel.text = @"There is no user info";
            else
                cell.textLabel.text = userInfo;
          return cell;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to follow this tutorial on using Google Map View in Android.
I'm trying to follow this tutorial here but the tutorial seems to use this
I'm trying to follow this tutorial to made a Word doc template that i
So I'm trying to follow a tutorial for Knockout, unfortunately the tutorial is using
I'm using Ruby on Rails 3.0.8. I'm trying to follow the tutorial by Ryan
I am trying to follow this tutorial http://damianm.com/tech/nhibernate-mvc-and-ninject/ but I am running into some
I'm trying to follow THE magnificient Rails3 tutorial at http://railstutorial.org but ran into a
I am trying to follow the first part of jersey tutorial using Grizzly as
I'm trying to follow Google's tutorial for implementing a ViewPager with Fragments using the
I am trying to done that tutorial http://blog.springsource.com/2011/01/04/green-beans-getting-started-with-spring-mvc/ but I am stuck just before

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.