Android TwitterApiClient: what is correct callback syntax for the POST method?


I have created a post - sorry Twitter it’s easier to discuss it there :slightly_smiling:


(Moved to the REST API thread as this is not Fabric related).


Difficult to respond here unless you provide us with some further information about your question?


Here’s my hack. If there is a better solution please let me know or update the link.
Can the API be improved to avoid creating the List if it already exists? There should be a reasonable default and the opposite functionality can be another parameter passed in the POST call. e.g. by default the API would allow duplicates, but the API could take a duplicate=no parameter if needed.

interface CustomService {
    void createList(@Query("name") String name, @Query("mode") String mode, Callback<JsonElement> cb);

MyTwitterApiClient api = new MyTwitterApiClient(session);
api.getCustomService().createList("MyListName", "private", new Callback<JsonElement>() {
    public void success(Result<JsonElement> result) {
       Log.d(TAG, " [success] status: " + result.response.getStatus());
       JsonElement je =;
       Log.d(TAG, " [success] data: " + je.getAsJsonObject().toString());
       public void failure(TwitterException e) { }