objective c - Retrieving Facebook check ins using iOS graph API - no data -


i'm trying use facebook's graph api retrieve list of checkins myself iphone application. i've requested token , able access profile information , list of friends, when request checkins empty record set. i'm guessing has permissions i'm requesting, can query same permission on facebook graph api explorer (https://developers.facebook.com/tools/explorer?method=get&path=me%2fcheckins) , data.

token request:

nsarray *perm = [nsarray arraywithobjects:      @"user_status", @"user_events", @"user_location",     @"friends_checkins", @"friends_status", nil];  [fbsession openactivesessionwithreadpermissions:perm                                    allowloginui:yes                               completionhandler:  ^(fbsession *session,    fbsessionstate state, nserror *error) {      //handle session opening  }]; 

then when try retrieve checkins (in seperate view controller):

[[fbrequest requestforgraphpath:@"/me/checkins"] startwithcompletionhandler:  ^(fbrequestconnection *connection,    nsdictionary<fbgraphobject> *checkins,    nserror *error) {      if (!error) {          nslog(fbsession.activesession.description);          nsarray *data = [checkins objectforkey:@"data"];          (fbgraphobject *c in data) {              //execution never gets here because data empty          }      }  }]; 

the execution never reaches for loop because data variable empty.

i've printed out current session state before for loop ensure correct. result was:

<fbsession: 0x15555555, state: fbsessionstateopen, loginhandler: 0x5555555, appid:  55555555555, urlschemesuffix: , tokencachingstrategy:<fbsessiontokencachingstrategy:  0x15555555>, expirationdate: 4001-01-01 00:00:00 +0000, refreshdate: 2013-05-15 06:55:56  +0000, attemptedrefreshdate: 0001-12-30 00:00:00 +0000, permissions:(     "user_status",     "user_events",     "user_location",     "friends_checkins",     "friends_status" )> 

i can't figure out might missing.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -