diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfacebookconnect.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfacebookconnect.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 30ebedca25..0d11658d07 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -75,7 +75,7 @@ public: { if (query_map.has("code")) { - LLFacebookConnect::instance().connectToFacebook(query_map["code"]); + LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state")); } return true; } @@ -286,11 +286,13 @@ std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route) return url; } -void LLFacebookConnect::connectToFacebook(const std::string& auth_code) +void LLFacebookConnect::connectToFacebook(const std::string& auth_code, const std::string& auth_state) { LLSD body; if (!auth_code.empty()) body["code"] = auth_code; + if (!auth_state.empty()) + body["state"] = auth_state; LLHTTPClient::put(getFacebookConnectURL("/connection"), body, new LLFacebookConnectResponder()); } diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index 0f828cf43e..77b1896c6e 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -54,9 +54,9 @@ public: FB_POST_FAILED = 6 }; - void connectToFacebook(const std::string& auth_code = ""); // Initiate the complete FB connection. Please use checkConnectionToFacebook() in normal use. - void disconnectFromFacebook(); // Disconnect from the FBC service. - void checkConnectionToFacebook(bool auto_connect = false); // Check if an access token is available on the FBC service. If not, call connectToFacebook(). + void connectToFacebook(const std::string& auth_code = "", const std::string& auth_state = ""); // Initiate the complete FB connection. Please use checkConnectionToFacebook() in normal use. + void disconnectFromFacebook(); // Disconnect from the FBC service. + void checkConnectionToFacebook(bool auto_connect = false); // Check if an access token is available on the FBC service. If not, call connectToFacebook(). void loadFacebookFriends(); void postCheckin(const std::string& location, const std::string& name, const std::string& description, const std::string& picture, const std::string& message); |