--- a/libpurple/protocols/facebook/http.c Mon Aug 03 22:34:20 2015 -0400 +++ b/libpurple/protocols/facebook/http.c Tue Aug 04 20:45:13 2015 -0400 @@ -122,7 +122,7 @@ } gchar * -fb_http_params_close(FbHttpParams *params, gsize *size) +fb_http_params_close(FbHttpParams *params, const gchar *url) { GHashTableIter iter; gpointer key; @@ -147,8 +147,9 @@ g_string_append_uri_escaped(ret, val, NULL, TRUE); } - if (size != NULL) { - *size = ret->len; + if (url != NULL) { + g_string_prepend_c(ret, '?'); + g_string_prepend(ret, url); } fb_http_params_free(params); @@ -223,6 +224,16 @@ return fb_http_params_get(params, name, error); } +gchar * +fb_http_params_dup_str(FbHttpParams *params, const gchar *name, + GError **error) +{ + const gchar *str; + + str = fb_http_params_get(params, name, error); + return g_strdup(str); +} + static void fb_http_params_set(FbHttpParams *params, const gchar *name, gchar *value) {