android - How to post text on Facebook wall when login with different id -


i implementing facebook sharing in application getting problem like,i able post on facebook when login facebook id, when login different email id not able post on facebook. working 1 facebook id.

here code:

public void postonfacebook(session session)     {         if(session.isopened()){             if (session != null){                   session.newpermissionsrequest newpermissionsrequest = new session.newpermissionsrequest((activity) this, arrays.aslist("publish_actions"));                 session.requestnewpublishpermissions(newpermissionsrequest);                  bundle post = new bundle();                  post.putstring("message","hello everyone");                  request.callback callback= new request.callback() {                     public void oncompleted(response response) {                      }                 };                  request request = new request(session, "me/feed", post,                          httpmethod.post, callback);                  requestasynctask task = new requestasynctask(request);                 task.execute();                 toast.maketext(getapplicationcontext(), "successfully",toast.length_short).show();                 logout();              }         }      }      public void logout()     {         session session = session.getactivesession();         if (session != null){             session.closeandcleartokeninformation();             session = null;         }     } 

you need enable "make app public feature". select right side button enable yes. also, make green circle side of app name in solid green.

after step app accessible facebook account. else, till not done, defaultly accessible account in app registered.

enter image description here


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -