diff options
author | Merov Linden <merov@lindenlab.com> | 2013-07-12 17:58:57 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-07-12 17:58:57 -0700 |
commit | 7414490a7a068f14d34fff104476647f5057cf35 (patch) | |
tree | a6990a35228475db10902e95f89214ed5df48dcf | |
parent | 0530eac42c8cbb4f41131e8d7796006b47ba1fa5 (diff) | |
parent | 36db132f236d4a3606b42a2a6af1b31c47892706 (diff) |
Pull merge from lindenlab/viewer-fbc
-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); |