From f97056b77e2788fac8fe723a9ac7e2aac9517932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 27 Aug 2014 10:29:11 +0000 Subject: 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 --- protocols/FacebookRM/src/communication.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'protocols/FacebookRM/src/communication.cpp') 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, "", ""); - - // 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", "", ""); + // 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", "", "", "self_.real_name.find(""); @@ -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\"", "self_.image_url = utils::text::source_get_value(&resp.data, 4, "id=\"root", "class=\"l\"", "debugLogA(" Got self avatar: %s", this->self_.image_url.c_str()); parent->CheckAvatarChange(NULL, this->self_.image_url); -- cgit v1.2.3