Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook API for Android: how to get extended info regarding user`s friends?
    primarykey
    data
    text
    <p>I`m working on small Android application, trying to add Facebook support.</p> <p>Main problem: I can get only basic info regarding user`s friends (id, name). List of app permissions (offline_access is here just for test, will be removed soon):</p> <pre><code> String[] sPermissions = { "friends_about_me" , "friends_birthday" , "friends_location" , "friends_website" , "offline_access" }; mLoginButton.init(this, mFacebook, sPermissions); </code></pre> <p>Following request works fine - returns a list of id:name pairs,</p> <pre><code> mAsyncRunner.request("me/friends", new SampleRequestListener()); </code></pre> <p>but if I change it in order to get more info</p> <pre><code> mAsyncRunner.request("me/friends?fields=id,name,birthday,hometown", new SampleRequestListener()); </code></pre> <p>server returns error "An active access token must be used to query information about the current user." I tested these Graph API requests using browser - both of them work as expected.</p> <p>Small remark: I`m using default debug cetificate to sign apllication and add it hash as facebook application hash according to Facebook instruction:</p> <blockquote> <p>Register your application's Android key hash. This is used by Facebook to ensure that another app can't impersonate your app when talking to the Facebook Android app.</p> <p>Generate the key hash:</p> <p>keytool -exportcert -alias [alias] -keystore [keystore] | openssl sha1 -binary | openssl base64 In the Facebook developer settings, go to the Mobile and Devices tab.</p> <p>In the Android section, enter the key hash in the Key Hash field.</p> </blockquote> <p>Maybe there is another way to get user`s frineds info (bday, location, gender and so on)?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload