Search code examples
androidfacebookfacebook-wall

How to post on Facebook with Android using the latest SDK


All the samples I have seen so far seem to be using an earlier version of the SDK and the parameters and calls don't match. Using the latest SDK, I'm trying this:

            String access_token = facebook.getAccessToken();
            Bundle bundle = new Bundle();
            bundle.putString("access_token", access_token);
            bundle.putString("app_id", FACEBOOK_APP_ID);
            bundle.putString("message", "My First Post");
            bundle.putString("description", "My First Description");
            asyncrunner.request("me/feed", bundle, new RequestListener() {

And i get back a call to onComplete() with response = "{"data":[]}.

And nothing ever gets posted to my wall on FB. Perhaps I'm not waiting long enough? How long should I need to wait before it shows up?


Solution

  • I recently published a blog article on TechRepublic that should help you with this. It is complete with sample code (minus the posting, but if you can't figure it out I'd be glad to help further). You can view my article here: