java - How to get the share(Post) photo URl or link with facebook SDk? -


i want take url of facebook post image. posting photo on facebook loginwithpublishpermissions want link or url of post image in call back....

 sharephoto photo = new sharephoto.builder()             .setbitmap(bitmap)             .setcaption("vodafone rakshavandhan!")             .build();      sharephotocontent content = new sharephotocontent.builder()             .addphoto(photo)             .build();    sharedialog sharedialog = new sharedialog(facebookshareactivity.this);     sharedialog.show(content, sharedialog.mode.automatic);      sharedialog.registercallback(callbackmanager, new facebookcallback<sharer.result>() {         @override         public void onsuccess(sharer.result result) {              log.e("@@@result", string.valueof(result));          /*  "/"+mfbid+"_"+postid+"?fields=link,message",*/             string postid=result.getpostid().tostring();          murlfb="https://www.facebook.com/photo.php?fbid="+postid;             log.e("@@@murlfb",murlfb);                  graphrequest request = new graphrequest(                         accesstoken,                     "/"+mfbid+"_"+postid,                     null,                     httpmethod.get,                     new graphrequest.callback() {                         public void oncompleted(graphresponse response) {           log.e("@@response", string.valueof(response));                          }        });               bundle parameters = new bundle();             parameters.putstring("fields", "id,link,message");             request.setparameters(parameters);             request.executeasync();         /*  new graphrequest(                     accesstoken.getcurrentaccesstoken(),                     result.getpostid(),                     null,                     httpmethod.get,                     new graphrequest.callback() {                         public void oncompleted(graphresponse response) {                                 log.e("@@response", string.valueof(response));                         }                     }             ).executeasync();*/             }          @override         public void oncancel() {         }          @override         public void onerror(facebookexception e) {             e.printstacktrace();         }     }); 

i getting response graph request

  {response:  responsecode: 200, graphobject:   {"id":"104752556880730_105851436770842"}, error: null} 

any appreciate.

special @cbroe

only add parameter **permalink_url**

 parameters.putstring("fields", "id,link,message,permalink_url"); 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -