Changeset 75bda8b for protocols/twitter


Ignore:
Timestamp:
2013-01-14T22:32:59Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
a9a6598
Parents:
35571fb
Message:

Fixed Twitter favourite command. Its syntax was silently changed in the 1.1
API. A full list of diffs would be helpful, guys...

Location:
protocols/twitter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r35571fb r75bda8b  
    12421242void twitter_favourite_tweet(struct im_connection *ic, guint64 id)
    12431243{
    1244         char *url;
    1245         url = g_strdup_printf("%s%llu%s", TWITTER_FAVORITE_CREATE_URL,
    1246                               (unsigned long long) id, ".json");
    1247         twitter_http_f(ic, url, twitter_http_post, ic, 1, NULL, 0,
    1248                        TWITTER_HTTP_USER_ACK);
    1249         g_free(url);
    1250 }
     1244        char *args[2] = {
     1245                "id",
     1246                NULL,
     1247        };
     1248        args[1] = g_strdup_printf("%llu", (unsigned long long) id);
     1249        twitter_http_f(ic, TWITTER_FAVORITE_CREATE_URL, twitter_http_post,
     1250                       ic, 1, args, 2, TWITTER_HTTP_USER_ACK);
     1251        g_free(args[1]);
     1252}
  • protocols/twitter/twitter_lib.h

    r35571fb r75bda8b  
    6969/* Favorites URLs */
    7070#define TWITTER_FAVORITES_GET_URL "/favorites.json"
    71 #define TWITTER_FAVORITE_CREATE_URL "/favorites/create/"
    72 #define TWITTER_FAVORITE_DESTROY_URL "/favorites/destroy/"
     71#define TWITTER_FAVORITE_CREATE_URL "/favorites/create.json"
     72#define TWITTER_FAVORITE_DESTROY_URL "/favorites/destroy.json"
    7373
    7474/* Block URLs */
Note: See TracChangeset for help on using the changeset viewer.