Creating a custom Wall Post with Facebook API on Android

后端 未结 1 669
有刺的猬
有刺的猬 2021-01-07 07:53

I\'m new to Facebook API on Android, and basically, what I\'m trying to do is creating custom wall post for an application I\'m developing. Like when you listen a Shazam a s

相关标签:
1条回答
  • 2021-01-07 08:32

    Are you sure you need to set custom parameters? It sounds like you can just want to post a Facebook message directly to the wall: you can do this by simply handing in the message parameter as a string -- you only need all that JSON if you want to attach an image etc. And note on facebook's page it says using this api call won't post a status update that others can see on their feed, it will just appear on their own wall. If you just want to post a message with a link you should just be able to use your mAsyncRunner (once you have your valid Facebook session) using this:

    String message = "Post this to my wall";
    Bundle parameters = new Bundle();        
    parameters.putString("message", message);   
    mAsyncRunner.request("me/feed", parameters, "POST", new WallPostRequestListener());
    

    Also may help if you posted the error/response code you're getting from Facebook.

    0 讨论(0)
提交回复
热议问题