Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - fql getting id from album not working in sdk 3.5
    primarykey
    data
    text
    <p>I have made a lot of combinations to get this working but I'm always getting an empty json, however in the Graph API Explorer it works very well, I'm using this statement to get the id of the albums from a X user:</p> <pre><code>SELECT aid from album WHERE owner = XXXXXXXXXX </code></pre> <p>it is returning (for example):</p> <pre><code>{ "data": [ { "aid": "xxxxxxx_xxxx" }, { "aid": "xxxxxxxx_xxx" } ] } </code></pre> <p>in the drop down menu (where normally is Graph Api explorer selected) I have changed for my app, also I'm using the button "get access token" and selecting: "user_photos","friends_photos","user_friends" permissions,</p> <p>but in my android app only I retrieve an empty json, (note: I have used another statement to recover user data (such as birthday) with this code, and works fine so code is correct, note2: I'm using the "user_photos","friends_photos","user_friends" permissions inside the app).</p> <p>the code of the app (the fragment) is:</p> <pre><code>mynewbutton = (Button) view.findViewById(R.id.mynewbutton); mynewbutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View v) { String fqlQuery = "SELECT aid from album WHERE owner = XXXXXXXXX"; Bundle params = new Bundle(); params.putString("q", fqlQuery); Session session = Session.getActiveSession(); // params.putString("access_token", session.getAccessToken()); Request request = new Request(session, "/fql", params, HttpMethod.GET, new Request.Callback(){ public void onCompleted(Response response) { //Log.i(TAG, "Result: " + response.toString()); } }); Request.executeBatchAsync(request); } }); </code></pre> <p>Possible the reason is cuz I'm not getting the "valid access_token" inside the app. So it came some questions in mind:<br> 1.-How do I get the access_token?<br> 2.-Do I need to use the method getAccessToken()?<br> 3.-If so, How do I integrate in my code?<br> 4.-Is it necessary to change something in the Graph Api Explorer in order to get working well in the app?<br> 5.- Am I missing something (a step or a piece of code for example)?<br> 6.-In general, How do I get the aid from album inside my app just like in the Graph Api Explorer?<br> thanks.</p>
    singulars
    1. This table or related slice is empty.
    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.
    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