crino / instagram-ios-sdk

Instagram SDK for iOS
http://www.followgram.me
228 stars 63 forks source link

Get location id with user/self/feed #13

Closed m9aileekh closed 11 years ago

m9aileekh commented 11 years ago

Hello,

Dear I did this one:

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"users/self/feed", @"method", nil];

but how to get the data of locations ?

an example:

cell.textLabel.text = [[self.data objectAtIndex:indexPath.row] objectForKey:@"location->id"];

^ I want to return the id of location

Thanks alot

crino commented 11 years ago

assuming self.data is the data array objects returned by the sdk: cell.textLabel.text = [[self.data objectAtIndex:indexPath.row] objectForKeyPath:@"location.id"];

m9aileekh commented 11 years ago

Hello, am sorry it doesn't work !!

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"users/self/feed", @"method", nil];

&&

cell.textLabel.text = [[self.data objectAtIndex:indexPath.row] objectForKey:@"location.id"];

But nothing in the table view !!

crino commented 11 years ago

Use objectForKeyPath and not objectForKey

m9aileekh commented 11 years ago

No known instance method for selector 'objectForKeyPath:'

crino commented 11 years ago

It''s the same of objectForKey. look at my previous comment

m9aileekh commented 11 years ago

I really don't understand what did you mean, I used objectForKey and not works , I copied your code above with objectForKeyPath and doesn't work

Please a little help :)

I appreciate your efforts dear

crino commented 11 years ago

how do you set self.data??

m9aileekh commented 11 years ago

Same in the example I didnt change only the api url

m9aileekh commented 11 years ago

Where could I set self.data ?

crino commented 11 years ago

if you working on example, self.data is set at line 163. be sure self.data is correctly set

m9aileekh commented 11 years ago

Okay got it, Thanks for your help man