android share on facebook sdk 3.0.2 -


i want share sometext on facebook using android facebook sdk 3.0.2

i tried this:

bundle params = new bundle();                 params.putstring("caption", "test");                 params.putstring("message", "test");                 params.putstring("link", "https://www.google.com");                 // params.putstring("picture", "picture_url");                  request request = new request(session.getactivesession(),                         "me/feed", params, httpmethod.post);                 request.setcallback(new request.callback() {                     @override                     public void oncompleted(response response) {                         if (response.geterror() == null) {                             toast.maketext(about.this, "successfully posted",                                     toast.length_long).show();                         } else                             toast.maketext(about.this, "an error has happened",                                     toast.length_short).show();                     }                 });                 request.executeasync();             } 

the toast printing an error has happened

any appreciated

    session s = session.getactivesession();  request request = request.newstatusupdaterequest(s, "your msg", new request.callback()      {         @override         public void oncompleted(response response)         {             if(response.geterror()==null)                  toast.maketext(mainactivity.this, "status updated successfully", toast.length_long).show();          }     });     request.executeasync(); 

this post message if signed in , have provided permissions.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -