objective c - No results returned when doing Facebook Query -


i'm trying list of aid (album ids) using facebook query.

what works:

running query browser returns results, when run using facebook connect no values returned.

the problem i'm having specific album object, results when querying user table.

the real difference can think of when running browser access_token parameter included, running browser without returns nothing.

authentication:

i using oauth authenticate outlined here: mobile apps - getting started need include access_token in parameter list when doing query?

the code:

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {          facebook = [[facebook alloc] initwithappid:@"<myappid>"];      nsuserdefaults *defaults = [nsuserdefaults standarduserdefaults];     if ([defaults objectforkey:@"fbaccesstokenkey"]          && [defaults objectforkey:@"fbexpirationdatekey"]) {         facebook.accesstoken = [defaults objectforkey:@"fbaccesstokenkey"];         facebook.expirationdate = [defaults objectforkey:@"fbexpirationdatekey"];     }      if (![facebook issessionvalid]) {         [facebook authorize:nil delegate:self];     }      nsarray* permissions =  [[nsarray arraywithobjects:                               @"email", @"read_stream", nil] retain];      [facebook authorize:permissions delegate:self];      nsstring *fql = [nsstring stringwithformat:@"select aid album owner=me()"];      nsmutabledictionary* params = [nsmutabledictionary dictionarywithobjectsandkeys:fql, @"query", @"json", @"format", nil];      [facebook requestwithmethodname:@"fql.query" andparams:params andhttpmethod:@"get" anddelegate:self];         return yes; } - (void)request:(fbrequest *)request didload:(id)result {     if ([result iskindofclass:[nsarray class]]) {         result = [result objectatindex:0];  }      nslog(@"didload() received result: %@", result); } 

yes, absolutely need include access_token field. verify access token has access user_photos permission before allowing access user's data.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -