Facebook SDK android, get connected accounts -
a facebook user can control multiple pages. example, user can have personal facebook account, public figure page , business page. shows 3 distinct accounts own user
information in facebook's server.
i want list these things, how can retrieve these accounts using facebook sdk?
i feel has request.newmerequest
method, returns graphuser
object.
and request.newmyfriendsrequest
returns list of users, not list of personal account's connected accounts.
edit using this
new com.facebook.request( session, "/me/accounts", null, httpmethod.get, new com.facebook.request.callback() { @override public void oncompleted(com.facebook.response response) { if(response!=null && response.getgraphobjectlist()!=null){ } } } ).executeasync();
but response
null. session has manage_pages
permission requested well
edit tried replacing "/me/accounts"
"/"+userid+"/accounts"
, still null response. baffling.
insight appreciated
you can test procedure @ graph api explorer -> click on 'get access token' button-> under 'extended permission' check 'manage_pages' & submit it. give admin-page-details json. , please see graph api reference /{user-id}/accounts
Comments
Post a Comment