diff options
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index b9d7a9d980..34fcaa7735 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -39,8 +39,10 @@ http::response facebook_client::flap(RequestType request_type, std::string *post // Prepare the request NETLIBHTTPREQUEST nlhr = { sizeof(NETLIBHTTPREQUEST) }; + std::string server = choose_server(request_type); + // Set request URL - std::string url = HTTP_PROTO_SECURE + choose_server(request_type) + choose_action(request_type, get_data); + std::string url = HTTP_PROTO_SECURE + server + choose_action(request_type, get_data); if (!parent->m_locale.empty()) url += "&locale=" + parent->m_locale; @@ -72,6 +74,10 @@ http::response facebook_client::flap(RequestType request_type, std::string *post // Set flags nlhr.flags = NLHRF_HTTP11 | NLHRF_SSL; + if (server == FACEBOOK_SERVER_MOBILE) { + nlhr.flags |= NLHRF_REDIRECT; + } + #ifdef _DEBUG nlhr.flags |= NLHRF_DUMPASTEXT; #else |