diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-05-21 13:46:45 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-05-21 13:46:45 +0000 |
commit | 9a90397f8161d9bd771a76b123883a65dd254651 (patch) | |
tree | 22c5cd14cb81cbe6b15e8a1d9ffecb00d2a67575 /protocols/FacebookRM/src/communication.cpp | |
parent | 0129f9cbc4388c6525863818575aa839082c0690 (diff) |
Facebook: Pretty much fixed getting newsfeeds
git-svn-id: http://svn.miranda-ng.org/main/trunk@9270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 4caf79d536..e60e333b61 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -446,12 +446,12 @@ std::string facebook_client::choose_action(RequestType request_type, std::string case REQUEST_FEEDS: { - std::string action = "/ajax/intent.php?filter="; - action += get_newsfeed_type(); - action += "&request_type=4&__a=1&newest=%s&ignore_self=true&load_newer=true&__user=%s"; - std::string newest = utils::conversion::to_string((void*)&this->last_feeds_update_, UTILS_CONV_TIME_T); + std::string action = "/ajax/home/generic.php?" + get_newsfeed_type(); + action += "&__user=" + self_.user_id + "&__a=1"; + + /*std::string newest = utils::conversion::to_string((void*)&this->last_feeds_update_, UTILS_CONV_TIME_T); utils::text::replace_first(&action, "%s", newest); - utils::text::replace_first(&action, "%s", self_.user_id); + utils::text::replace_first(&action, "%s", self_.user_id);*/ return action; } @@ -604,8 +604,13 @@ std::string facebook_client::get_newsfeed_type() { BYTE feed_type = parent->getByte(FACEBOOK_KEY_FEED_TYPE, 0); if (feed_type >= SIZEOF(feed_types)) - feed_type = 0; - return feed_types[feed_type].id; + feed_type = 0; + + std::string ret = "sk="; + ret += feed_types[feed_type].id; + ret += "&key="; + ret += (feed_type < 2 ? "nf" : feed_types[feed_type].id); + return ret; } std::string facebook_client::get_server_type() |