diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-07-17 13:55:22 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-07-17 13:55:22 +0000 |
commit | 7cbf9e427b934de647350f1eb1552a3f7ea2992b (patch) | |
tree | 753258b7a7f1b48e3491b88de695cd5b5a84e62f /protocols/FacebookRM | |
parent | 1b738108deb1ec217115e38dde3ebd2210870213 (diff) |
Facebook: Fixed searching by ID people which doesn't have username
git-svn-id: http://svn.miranda-ng.org/main/trunk@5399 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 6 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 3 |
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)
|