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

  • Home
  • SEARCH
  • 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 6024077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:06:08+00:00 2026-05-23T04:06:08+00:00

I am using Facebook graph API and getting its result in json format.. I

  • 0

I am using Facebook graph API and getting its result in json format.. I am able to print some result but confused in others..

  application =         {
        id = 142759389130183;
        name = iphonemini;
    };
    caption = "widevision.co.in";
    "created_time" = "2011-06-14T07:56:38+0000";
    from =         {
        id = 100001507678574;
        name = "Widevision Dev";
    };
    icon = "http://www.facebook.com/images/icons/hidden.gif";
    id = "100001507678574_173203589406562";
    link = "http://widevision.co.in/";
    message = "Good Afternoon";
    name = "Check It out";
    type = link;
    "updated_time" = "2011-06-14T07:56:38+0000";
},

I can print this icon, id , link by this code

FbGraphResponse *fb_graph_response = [fbGraph doGraphGet:@"me/feed" withGetVars:nil];


    NSLog(@"method called");
    //parse our json
    SBJSON *parser = [[SBJSON alloc] init];
    NSDictionary *facebook_response = [parser    objectWithString:fb_graph_response.htmlResponse error:nil];    

    [parser release];

    //NSString *feed;
    //  NSString *feed2;
    NSMutableArray *feed =(NSMutableArray *) [facebook_response objectForKey:@"data"];

    //  NSMutableArray *feed1=(NSMutableArray *) [feed valueForKey:@"type"];


    NSLog(@"Feed %@" ,feed );

    NSLog(@"Message is %@ ",[feed valueForKey:@"icon"]);

    NSLog(@"Name is %@",[feed valueForKey:@"name"]);

.. also get this

from ={
    id= ;
    name = "";
    }


NSMutableArray *streams = (NSMutableArray *)[feed valueForKey:@"from"];



    // loop over all the stream objects and print their titles
        int index;
        NSMutableDictionary *stream;

        for (index = 0; index < [feed count];index++) {
            stream = (NSMutableDictionary *)[streams objectAtIndex:index];



            NSLog(@"Message is %@:",[stream valueForKey:@"name"]);

        }

But how can I parse this comments = { }....

{
        application =         {
            id = 136664723060869;
            name = Iphoneapp;
        };
        caption = "bit.ly";
        comments =         {
            count = 2;
            data =             (
                                {
                    "created_time" = "2011-06-14T07:39:45+0000";
                    from =                     {
                        id = 100001507678574;
                        name = "Widevision Dev";
                    };
                    id = "100001507678574_164163733643881_1822049";
                    likes = 1;
                    message = hi;
                },
                                {
                    "created_time" = "2011-06-14T08:17:31+0000";
                    from =                     {
                        id = 100001507678574;
                        name = "Widevision Dev";
                    };
                    id = "100001507678574_164163733643881_1822143";
                    message = hmmm;
                }
            );
        };

please help

  • 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-23T04:06:08+00:00Added an answer on May 23, 2026 at 4:06 am

    Well, I see a clear json object here. I would take example of SBJSON where all the JSON is parsed into NSDictionary object, where application, caption, comments are the keys. The object for comment again forms a dictionary with keys; count, data. Once you get to the data you have an array of the entire data and so this array contains multiple dictionary. Getting each dictionary within the array of data should solve your problem. Best of luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the new facebook graph API and getting an odd error when I
I am using the PHP library for the Graph API ( http://github.com/facebook/php-sdk ) but
Using the Facebook API, is there a way of getting a friend's phone/cell number?
I am using facebook's graph api to retrieve user's information. First I retrieved the
I have a couple of problems using facebook graph api. 1). When i try
In PHP, I'm using curl to send a delete to the fb graph api
I'm trying to familiarize myself with Facebook's new Graph API and so far I
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
I have an application that integrates with Facebook using Oauth 2. I can authorize
The old Facebook API provided the user sex/gender as part of the default user

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.