How do I make text from an textbox send to the user's wall with facebook's android sdk? -
i have login scheme working , things working smoothly. however, user has press button says "post", pops screen (similar browser) can type up. want implement way them type post textbox in main activity , press button post facebook wall. possible? have facebook sdk android already.
i have used this:
bundle = new bundle(); bundle.putstring("message", msg); session session = session.getactivesession(); if(session != null){ toast.maketext(context, "posting...", toast.length_long).show(); request.callback callback= new request.callback() { public void oncompleted(response response) { facebookrequesterror error = response.geterror(); if (error != null) { toast.maketext(context, "failed post", toast.length_long).show(); } else { toast.maketext(context, "successfully posted", toast.length_long).show(); } } }; request request = new request(session, "me/feed", bundle, httpmethod.post, callback); requestasynctask task = new requestasynctask(request); task.execute(); }
this technique, using graph-api. using graph-api u can post user's wall (without openning browser or webview). if u seek post on user's friend wall fail.
android facebook
No comments:
Post a Comment