summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/FacebookRM/src/communication.cpp2
-rw-r--r--protocols/FacebookRM/src/process.cpp6
-rw-r--r--protocols/FacebookRM/src/proto.cpp3
3 files changed, 7 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index 5ef0009d30..0ebb32ba3b 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -383,7 +383,7 @@ std::string facebook_client::choose_action(RequestType request_type, std::string
case REQUEST_USER_INFO:
{
- std::string action = "/%s?v=info";
+ std::string action = "/%sv=info";
if (get_data != NULL) {
utils::text::replace_all(&action, "%s", *get_data);
}
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 68159e5672..b2b4cabb8f 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -808,14 +808,14 @@ void FacebookProto::SearchIdAckThread(void *targ)
facy.handle_entry("searchIdAckThread");
char *arg = mir_utf8encodeT((TCHAR*)targ);
- std::string search = utils::url::encode(arg);
+ std::string search = utils::url::encode(arg) + "?";
if (!isOffline())
{
- http::response resp = facy.flap(REQUEST_USER_INFO, NULL, &search);
+ http::response resp = facy.flap(REQUEST_USER_INFO, NULL, &search);
if (resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end()) {
- search = utils::text::source_get_value2(&resp.headers["Location"], FACEBOOK_SERVER_MOBILE"/", "?", true);
+ search = utils::text::source_get_value(&resp.headers["Location"], 2, FACEBOOK_SERVER_MOBILE"/", "_rdr", true);
resp = facy.flap(REQUEST_USER_INFO, NULL, &search);
}
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 793d99b8fd..55655dbb10 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -242,6 +242,9 @@ HANDLE FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
ptrA name = mir_t2a_cp(psr->firstName, CP_UTF8);
ptrA surname = mir_t2a_cp(psr->lastName, CP_UTF8);
+ if (id == NULL)
+ return NULL;
+
facebook_user fbu;
fbu.user_id = id;
if (name != NULL)