Hi i´m developing an android application for a website with installed buddypress. When i do the request (from the app) to get all media uploaded by an user i have this error message:
{¨status¨:¨FALSE¨, ¨status_code¨:160003, ¨message¨:¨no media found for requested media type¨, ¨data¨:false}
but the user have 4 images uploaded and i can see it from the website. This is the code of the request:
final String url="http:/mywesite.com/wp-admin/admin-ajax.php";
StringRequest getGallery= new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
@Override
public void onResponse(String arg0) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), arg0.toString(), Toast.LENGTH_LONG).show();
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError arg0) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), "***Error*** "+ arg0.getMessage().toString(), Toast.LENGTH_LONG).show();
}
})
{
@Override
protected Map<String, String> getParams()
{
Map<String, String> params = new HashMap<String, String>();
params.put("action", "rtmedia_api");
params.put("method", "rtmedia_gallery");
params.put("token", Globals.accessToken);
params.put("media_type", "all");
params.put("media_author", "current_user");
params.put("global", "true");
return params;
}
};