Fetch Facebook album cover photo - Android -
i try fetch album datas facebook , use this method fetch album cover photo. response this;
{response: responsecode: 200, graphobject: graphobject{graphobjectclass=graphobject, state={"facebook_non_json_result":"����\u0000\u0010jfif\u0000\u0001\u0002\u0000\u0000\u0001\u0000\u0001\u0000\u0000��\u0000�photoshop"}}, error: null, isfromcache:false}
what's that's mean ? how can image url or image ? code here :
   for(final fbalbumitem f: albums){         bundle params = new bundle();         params.putstring("type", "small");         new request(                 session.getactivesession(),                 "/"+f.getalbumid()+"/picture",                 params,                 httpmethod.get,                 new request.callback() {                     public void oncompleted(response response) {         /* handle result */                         log.i("socialmanager", "" + response);                         jsonobject obj = response.getgraphobject().getinnerjsonobject();                          try {                            jsonobject o = obj.getjsonobject("albums").getjsonobject("data");                             string url = o.getstring("url");                            f.setimageurl(url);                         } catch (jsonexception e) {                             e.printstacktrace();                         }                     }                 }         ).executeasync();   fbalbumitem : string albumid;  string albumname;  string albumcover;  string imageurl;
solved. use method change. add parameter
bundle params = new bundle(); params.putboolean("redirect", false);
thanks inspiration.
Comments
Post a Comment