diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-08-27 10:29:11 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-08-27 10:29:11 +0000 |
commit | f97056b77e2788fac8fe723a9ac7e2aac9517932 (patch) | |
tree | 69a5e556287a658405d85a2e81fb99adbf614520 /protocols/FacebookRM/src | |
parent | 72206e17e14de91b43f3bc1bcc6a69b2d0a514f3 (diff) |
Facebook: Hotfix for FB changes on mobile website, version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@10329 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 13 | ||||
-rw-r--r-- | protocols/FacebookRM/src/version.h | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index c9f8a50cf2..3223c110ff 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -960,12 +960,8 @@ bool facebook_client::home() { case HTTP_CODE_OK: { - // Get real name - this->self_.real_name = utils::text::source_get_value(&resp.data, 2, "<strong class=\"profileName\">", "</strong>"); - - // Try to get name again, if we've got some some weird version of Facebook - if (this->self_.real_name.empty()) - this->self_.real_name = utils::text::source_get_value(&resp.data, 4, "id=\"root", "<strong", ">", "</strong>"); + // Get real name (for mobile FB version since 27.8.2014) + this->self_.real_name = utils::text::source_get_value(&resp.data, 5, "id=\"root", "</a>", "<div", ">", "<img"); // Get and strip optional nickname std::string::size_type pos = this->self_.real_name.find("<span class=\"alternate_name\">"); @@ -975,6 +971,9 @@ bool facebook_client::home() this->self_.real_name = this->self_.real_name.substr(0, pos - 1); } + + this->self_.real_name = utils::text::remove_html(this->self_.real_name); + parent->debugLogA(" Got self real name: %s", this->self_.real_name.c_str()); if (this->self_.real_name.empty()) { @@ -986,7 +985,7 @@ bool facebook_client::home() parent->SaveName(NULL, &this->self_); // Get avatar - this->self_.image_url = utils::text::source_get_value(&resp.data, 3, "class=\"l\"", "<img src=\"", "\""); + this->self_.image_url = utils::text::source_get_value(&resp.data, 4, "id=\"root", "class=\"l\"", "<img src=\"", "\""); parent->debugLogA(" Got self avatar: %s", this->self_.image_url.c_str()); parent->CheckAvatarChange(NULL, this->self_.image_url); diff --git a/protocols/FacebookRM/src/version.h b/protocols/FacebookRM/src/version.h index a4018228d9..4376a641b8 100644 --- a/protocols/FacebookRM/src/version.h +++ b/protocols/FacebookRM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 9
-#define __BUILD_NUM 0
+#define __BUILD_NUM 1
#include <stdver.h>
|