summaryrefslogtreecommitdiff
path: root/indra/newview/llfacebookconnect.cpp
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-11-02 01:50:17 +0100
committerCho <cho@lindenlab.com>2013-11-02 01:50:17 +0100
commit0e71fb3c9d82bf2a307431f68f8ec84d223a4887 (patch)
treea6b8291a742154f60cafd8e484ebc3a67fde9987 /indra/newview/llfacebookconnect.cpp
parent963c97f64a4d1490fe8380805c4de38598adddad (diff)
added Flickr floater for ACME-1136, ACME-1137, ACME-1138, ACME-1140, and ACME-1141
Diffstat (limited to 'indra/newview/llfacebookconnect.cpp')
-rw-r--r--indra/newview/llfacebookconnect.cpp33
1 files changed, 28 insertions, 5 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index 2434272ef7..99fcab3dc3 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -28,6 +28,8 @@
#include "llviewerprecompiledheaders.h"
#include "llfacebookconnect.h"
+#include "llflickrconnect.h"
+#include "lltwitterconnect.h"
#include "llagent.h"
#include "llcallingcard.h" // for LLAvatarTracker
@@ -76,7 +78,7 @@ public:
{
if (tokens.size() >= 2)
{
- if (tokens[0].asString() == "connect" && tokens[1].asString() == "facebook")
+ if (tokens[0].asString() == "connect")
{
// this command probably came from the fbc_web browser, so close it
LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web");
@@ -85,12 +87,33 @@ public:
fbc_web->closeFloater();
}
- // connect to facebook
- if (query_map.has("code"))
+ if (tokens[1].asString() == "facebook")
{
- LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state"));
+ // connect to facebook
+ if (query_map.has("code"))
+ {
+ LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state"));
+ }
+ return true;
+ }
+ else if (tokens[1].asString() == "flickr")
+ {
+ // connect to flickr
+ if (query_map.has("oauth_token"))
+ {
+ LLFlickrConnect::instance().connectToFlickr(query_map["oauth_token"], query_map.get("oauth_verifier"));
+ }
+ return true;
+ }
+ else if (tokens[1].asString() == "twitter")
+ {
+ // connect to twitter
+ if (query_map.has("oauth_token"))
+ {
+ LLTwitterConnect::instance().connectToTwitter(query_map["oauth_token"], query_map.get("oauth_verifier"));
+ }
+ return true;
}
- return true;
}
}
return false;