summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelpeople.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index e229fd3cf3..01d68cb9a0 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -78,6 +78,8 @@ static const std::string FBCTEST_TAB_NAME = "fbctest_panel";
static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
+static const std::string FBC_SERVICES_URL = "https://pdp15.lindenlab.com";
+
/** Comparator for comparing avatar items by last interaction date */
class LLAvatarItemRecentComparator : public LLAvatarItemComparator
{
@@ -890,19 +892,18 @@ void LLPanelPeople::updateFbcTestList()
std::string title = mFbcTestBrowserHandle.get()->getTitle();
// if the data is ready (if it says the magic word)
- if (title.length() > 8 && title.substr(0, 8) == "FBCTEST ")
+ if (title.length() >= 2 && title[0] == ':')
{
- // get the list of friends' names from the title bar
- std::vector<std::string> names = LLStringUtil::getTokens(title.substr(8), ",");
-
- // display the names in the list
- std::string label;
- for (std::vector<std::string>::const_iterator i = names.begin() + 1; i != names.end(); ++i)
+ // success! :)
+ if (title[1] == ')')
+ {
+ mFbcTestText->setText(std::string("okay, now we can get the list of friends!"));
+ }
+ // failure :(
+ else if (title[1] == '(')
{
- label += *i;
- label += "\n";
+ mFbcTestText->setText(std::string("hmm, the authentication failed somehow"));
}
- mFbcTestText->setText(label);
// close the browser window
mFbcTestBrowserHandle.get()->die();
@@ -1690,10 +1691,10 @@ public:
//request user to login
else
{
- LLFloaterWebContent::Params p;
- p.url("https://www.facebook.com/dialog/oauth?client_id=565771023434202&redirect_uri=https://pdp15.lindenlab.com/authenticate/" + gAgentID.asString());
+ LLFloaterWebContent::Params p;
+ p.url("https://www.facebook.com/dialog/oauth?client_id=565771023434202&redirect_uri=" + FBC_SERVICES_URL + "/authenticate/" + gAgentID.asString());
mPanelPeople->openFacebookWeb(p);
- }
+}
}
else
{
@@ -1710,14 +1711,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://pdp15.lindenlab.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=Test&link=http://www.cnet.com&redirect_uri=https://pdp15.lindenlab.com/");
+ p.url("https://www.facebook.com/dialog/send?app_id=565771023434202&name=Test&link=http://www.cnet.com&redirect_uri=" + FBC_SERVICES_URL);
openFacebookWeb(p);
}
// EOF