summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-04-03 03:06:24 +0100
committerCho <cho@lindenlab.com>2013-04-03 03:06:24 +0100
commit207db356c21246ca9eb1b255b71623b0a5a4d470 (patch)
treed45a0f2df2d90ba71f214bc4f2021a610243c92b /indra
parent21e8d2ca30842422eb5eef469c9e1bb91c0c847b (diff)
got it working
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelpeople.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index ebf7002fc1..4b4dd27bf2 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -893,7 +893,10 @@ void LLPanelPeople::updateFbcTestList()
if (url.substr(0, FBC_SERVICES_URL.length()) == FBC_SERVICES_URL)
{
// get the auth code
- std::string auth_code = url.substr(FBC_SERVICES_URL.length() + 6);
+ std::string auth_code = url.substr(FBC_SERVICES_URL.length() + 7);
+ auth_code = auth_code.substr(0, auth_code.length() - 4);
+
+ llinfos << "extracted code " << auth_code << " from url " << url << llendl;
// finish authenticating on the server
connectToFacebook(auth_code);
@@ -1765,7 +1768,7 @@ public:
else if (mShowLoginIfNotConnected)
{
LLFloaterWebContent::Params p;
- p.url("https://www.facebook.com/dialog/oauth?client_id=565771023434202&redirect_uri=" + FBC_SERVICES_URL);
+ p.url("https://www.facebook.com/dialog/oauth?client_id=565771023434202&redirect_uri=" + FBC_SERVICES_URL + "/");
mPanelPeople->openFacebookWeb(p);
}
}
@@ -1814,6 +1817,7 @@ void LLPanelPeople::loadFacebookFriends()
void LLPanelPeople::connectToFacebook(const std::string& auth_code)
{
+ llinfos << "attempting to connect to facebook with code " << auth_code << llendl;
LLHTTPClient::post(FBC_SERVICES_URL + "/agent/" + gAgentID.asString() + "/fbc/connect/" + auth_code, LLSD(), new FacebookConnectResponder(this));
}
@@ -1837,14 +1841,14 @@ void LLPanelPeople::onLoginFbcButtonClicked()
void LLPanelPeople::onFacebookAppRequestClicked()
{
LLFloaterWebContent::Params p;
- p.url("http://www.facebook.com/dialog/apprequests?app_id=565771023434202&message=Test&redirect_uri=https://secondlife.com/");
+ p.url("http://www.facebook.com/dialog/apprequests?app_id=565771023434202&message=Test&redirect_uri=" + FBC_SERVICES_URL);
openFacebookWeb(p);
}
void LLPanelPeople::onFacebookAppSendClicked()
{
LLFloaterWebContent::Params p;
- p.url("https://www.facebook.com/dialog/send?app_id=565771023434202&name=Join Second Life!&link=https://join.secondlife.com&redirect_uri=https://secondlife.com/");
+ p.url("https://www.facebook.com/dialog/send?app_id=565771023434202&name=Join Second Life!&link=https://join.secondlife.com&redirect_uri=" + FBC_SERVICES_URL);
openFacebookWeb(p);
}
// EOF