Facebook graph api with paging
Hello I am trying to apply paging in facebook app..

I am getting NExt URL but null response from api..and there is more response also . my code is

    - (void)moreFeed {
    
    	FbGraphResponse *fb_graph_response = [fbGraph doGraphGet:@"me/feed" withGetVars:nil];
    	SBJSON *parser = [[SBJSON alloc] init];
    	NSDictionary *	facebook_response = [parser objectWithString:fb_graph_response.htmlResponse error:nil];	
    
    	//us a link with two links (next & previous)
    	NSDictionary *paging = (NSDictionary *)[facebook_response objectForKey:@"paging"];
    	NSString *next_page_url = (NSString *)[paging objectForKey:@"next"];
    	
    	NSLog(@"Next Page URL %@",next_page_url);
    	
    	FbGraphResponse *next_page_fb_graph_response = [fbGraph doGraphGetWithUrlString:next_page_url];
    	
    	NSLog(@"Next Page:  %@", next_page_fb_graph_response.htmlResponse);
    	
    	
    
    }


I checked with breakpoint and it is not going in response code ..it is going to else if part

    - (FbGraphResponse *)doGraphGetWithUrlString:(NSString *)url_string {
    	
    	FbGraphResponse *return_value = [[[FbGraphResponse alloc] init] autorelease];
    	NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url_string]];
    	NSLog(@"URL_STring %@",url_string);
    	
    	NSError *err;
    	NSURLResponse *resp;
    	NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:&resp error:&err];
    	
    	if (resp != nil) {
    		
    		/**
    		 * In the case we request a picture (avatar) the Graph API will return to us the actual image
    		 * bits versus a url to the image.....
    		 **/
    		if ([resp.MIMEType isEqualToString:@"image/jpeg"]) {
    			
    			UIImage *image = [UIImage imageWithData:response];
    			return_value.imageResponse = image;
    			
    		} else {
    		    
    			NSString *stringResponse = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
    			return_value.htmlResponse = stringResponse;
    			[stringResponse release];			
    		}
    		
    	} else if (err != nil) {
    		return_value.error = err;
    	}
    	
    	return return_value;
    	

    }


The Url is same but why it is not returning response??

Facebook graph api with paging
===

Hello I am trying to apply paging in facebook app..

I am getting NExt URL but null response from api..and there is more response also . my code is

    - (void)moreFeed {
    
    	FbGraphResponse *fb_graph_response = [fbGraph doGraphGet:@"me/feed" withGetVars:nil];
    	SBJSON *parser = [[SBJSON alloc] init];
    	NSDictionary *	facebook_response = [parser objectWithString:fb_graph_response.htmlResponse error:nil];	
    
    	//us a link with two links (next & previous)
    	NSDictionary *paging = (NSDictionary *)[facebook_response objectForKey:@"paging"];
    	NSString *next_page_url = (NSString *)[paging objectForKey:@"next"];
    	
    	NSLog(@"Next Page URL %@",next_page_url);
    	
    	FbGraphResponse *next_page_fb_graph_response = [fbGraph doGraphGetWithUrlString:next_page_url];
    	
    	NSLog(@"Next Page:  %@", next_page_fb_graph_response.htmlResponse);
    	
    	
    
    }


I checked with breakpoint and it is not going in response code ..it is going to else if part

    - (FbGraphResponse *)doGraphGetWithUrlString:(NSString *)url_string {
    	
    	FbGraphResponse *return_value = [[[FbGraphResponse alloc] init] autorelease];
    	NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url_string]];
    	NSLog(@"URL_STring %@",url_string);
    	
    	NSError *err;
    	NSURLResponse *resp;
    	NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:&resp error:&err];
    	
    	if (resp != nil) {
    		
    		/**
    		 * In the case we request a picture (avatar) the Graph API will return to us the actual image
    		 * bits versus a url to the image.....
    		 **/
    		if ([resp.MIMEType isEqualToString:@"image/jpeg"]) {
    			
    			UIImage *image = [UIImage imageWithData:response];
    			return_value.imageResponse = image;
    			
    		} else {
    		    
    			NSString *stringResponse = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
    			return_value.htmlResponse = stringResponse;
    			[stringResponse release];			
    		}
    		
    	} else if (err != nil) {
    		return_value.error = err;
    	}
    	
    	return return_value;
    	

    }


The Url is same but why it is not returning response??
