php - Getting app user data in graph api v2, using global IDs -


so version 2 of facebook's graph api introduces app-specific ids, protect user privacy spam or that. said users have added app in v1 using global id continue send global id in v2, keep app backward compatible.

this fine, v2 of api forbids getting user data global ids. call graph global ids inside canvas app gives exception saying use app-specific id instead.

i'm kind of @ loss here. i'm trying basic information of random subset of app's users, display current user, isn't friend. of users have global ids stored in database because joined long time ago. seems if app new, of ids stored in database app-specific, , able info. indicates me it's not facebook's intent forbid me getting data want. it's impossible me because of unfortunate situation of having old app.

is there way me data? know can revert v1 of graph go away on april 30, 2015. want basic info, , i'm displaying names.

i using version 4 of php sdk. request looks this:

(new facebookrequest(             self::$session, 'get', '',             array('ids' => implode(',', $userids))         ))->execute()->getgraphobjectlist(graphuser::classname()); 

my session comes calling getsession on facebookcanvasloginhelper shown in docs, have new access token , signed request.

edit

so, rescind question, because i'm dumb. sahil right. problem i'm working in separate app testing (not official test app, app created long time ago testing) app ids in question haven't added app, can't info. oops. reason migrate official test app.

edit again

i un-rescind question. facebook dumb. created official test app tied real app, , giving me app-specific id myself, not 1 given main app. check out page had trouble before, , same exception:

facebook\facebookauthorizationexception: global id 693041250 not allowed. please use application specific id instead. 

the dev page on test apps says:

  • test apps share same app-scoped user id namespace production app making simpler debug issues app-scoped ids, or in cases use copy of production database development.

this appears blatantly incorrect. i'm using copy of production database. know facebook id. wouldn't give own id given production app, let alone else's. new thing work brand new apps or something? i'm ready abandon facebook development @ point things this.

you correct in saying that-

users have added app in v1 using global id continue send global id in v2, keep app backward compatible.

but incorrect: but v2 of api forbids getting user data global ids. call graph global ids inside canvas app gives exception saying use app-specific id instead.

of-course you'll user data id returned v2 api (be global-id or app-specific-id).

sorry don't understand sdk's syntax you've used (i don't using sdks), i'm sure work. can test in graph api explorer, select app (top-middle) drop-down , call /v2/{user-id} of v1 user , result. must doing wrong in code.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -