summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2017-02-24 04:21:30 -0300
committerdequis <dx@dxzone.com.ar>2017-02-24 04:21:30 -0300
commitdb5ae4ba9e65062b9ea3c267a8eb61efc7d890cb (patch)
tree971da58da1fc4330d3c9a1d40b887278fc5bdc0b
parent59fcaab5096353bbe2f1366cbcf5f51290ca85ae (diff)
downloadbitlbee-facebook-db5ae4ba9e65062b9ea3c267a8eb61efc7d890cb.tar.gz
Fix creating threads, inviting, kicking members (misc api changes)
-rw-r--r--facebook/facebook-api.c10
-rw-r--r--facebook/facebook-api.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/facebook/facebook-api.c b/facebook/facebook-api.c
index cd68e3a..8c60dde 100644
--- a/facebook/facebook-api.c
+++ b/facebook/facebook-api.c
@@ -3003,7 +3003,7 @@ fb_api_cb_thread_create(FbHttpRequest *req, gpointer data)
}
values = fb_json_values_new(root);
- fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE, "$.thread_fbid");
+ fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE, "$.id");
fb_json_values_update(values, &err);
FB_API_ERROR_EMIT(api, err,
@@ -3050,8 +3050,8 @@ fb_api_thread_create(FbApi *api, GSList *uids)
json = fb_json_bldr_close(bldr, JSON_NODE_ARRAY, NULL);
prms = fb_http_values_new();
- fb_http_values_set_str(prms, "to", json);
- fb_api_http_req(api, FB_API_URL_THREADS, "createThread", "POST", prms,
+ fb_http_values_set_str(prms, "recipients", json);
+ fb_api_http_req(api, FB_API_URL_THREADS, "createGroup", "POST", prms,
fb_api_cb_thread_create);
g_free(json);
}
@@ -3072,7 +3072,7 @@ fb_api_thread_invite(FbApi *api, FbId tid, FbId uid)
prms = fb_http_values_new();
fb_http_values_set_str(prms, "to", json);
- fb_http_values_set_strf(prms, "id", "t_id.%" FB_ID_FORMAT, tid);
+ fb_http_values_set_strf(prms, "id", "t_%" FB_ID_FORMAT, tid);
fb_api_http_req(api, FB_API_URL_PARTS, "addMembers", "POST", prms,
fb_api_cb_http_bool);
g_free(json);
@@ -3090,7 +3090,7 @@ fb_api_thread_remove(FbApi *api, FbId tid, FbId uid)
priv = api->priv;
prms = fb_http_values_new();
- fb_http_values_set_strf(prms, "id", "t_id.%" FB_ID_FORMAT, tid);
+ fb_http_values_set_strf(prms, "id", "t_%" FB_ID_FORMAT, tid);
if (uid == 0) {
uid = priv->uid;
diff --git a/facebook/facebook-api.h b/facebook/facebook-api.h
index b6a2812..15ba046 100644
--- a/facebook/facebook-api.h
+++ b/facebook/facebook-api.h
@@ -136,7 +136,7 @@
*
* The URL for thread management requests.
*/
-#define FB_API_URL_THREADS FB_API_GHOST "/me/threads"
+#define FB_API_URL_THREADS FB_API_GHOST "/me/group_threads"
/**
* FB_API_URL_TOPIC: