aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2013-01-14 22:32:59 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2013-01-14 22:32:59 +0000
commit75bda8b5af30cbe659d7bdd4d06fafbea85782ab (patch)
tree725387a1ab69cd93616a2cbfacef878475c3857f
parent35571fb5d713f61bba6a4a3a91aed8c41827cc66 (diff)
Fixed Twitter favourite command. Its syntax was silently changed in the 1.1
API. A full list of diffs would be helpful, guys...
-rw-r--r--protocols/twitter/twitter_lib.c14
-rw-r--r--protocols/twitter/twitter_lib.h4
2 files changed, 10 insertions, 8 deletions
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index a8cc9d04..beb65107 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -1241,10 +1241,12 @@ void twitter_report_spam(struct im_connection *ic, char *screen_name)
*/
void twitter_favourite_tweet(struct im_connection *ic, guint64 id)
{
- char *url;
- url = g_strdup_printf("%s%llu%s", TWITTER_FAVORITE_CREATE_URL,
- (unsigned long long) id, ".json");
- twitter_http_f(ic, url, twitter_http_post, ic, 1, NULL, 0,
- TWITTER_HTTP_USER_ACK);
- g_free(url);
+ char *args[2] = {
+ "id",
+ NULL,
+ };
+ args[1] = g_strdup_printf("%llu", (unsigned long long) id);
+ twitter_http_f(ic, TWITTER_FAVORITE_CREATE_URL, twitter_http_post,
+ ic, 1, args, 2, TWITTER_HTTP_USER_ACK);
+ g_free(args[1]);
}
diff --git a/protocols/twitter/twitter_lib.h b/protocols/twitter/twitter_lib.h
index b3280e66..f59c81ef 100644
--- a/protocols/twitter/twitter_lib.h
+++ b/protocols/twitter/twitter_lib.h
@@ -68,8 +68,8 @@
/* Favorites URLs */
#define TWITTER_FAVORITES_GET_URL "/favorites.json"
-#define TWITTER_FAVORITE_CREATE_URL "/favorites/create/"
-#define TWITTER_FAVORITE_DESTROY_URL "/favorites/destroy/"
+#define TWITTER_FAVORITE_CREATE_URL "/favorites/create.json"
+#define TWITTER_FAVORITE_DESTROY_URL "/favorites/destroy.json"
/* Block URLs */
#define TWITTER_BLOCKS_CREATE_URL "/blocks/create/"