diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-06-04 18:39:41 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-06-04 18:39:41 -0700 |
commit | abcb3e85628712da4d61fda6e68bb86a29e1f965 (patch) | |
tree | 9f294ec80d47c4dedacd7c76966dde9d30b09743 /indra/newview/llviewermenu.cpp | |
parent | 6bf2dad1cc8df2769a0833786bc16eea96649d6d (diff) |
ACME-471: Once connected to facebook, a user can use the 'Check in to Facebook' button under the 'Me' menu to make a check in post to Facebook
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rwxr-xr-x | indra/newview/llviewermenu.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index bb9ad8c606..eb100a3f9b 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -45,6 +45,7 @@ #include "llagent.h" #include "llagentaccess.h" #include "llagentcamera.h" +#include "llagentui.h" #include "llagentwearables.h" #include "llagentpilot.h" #include "llcompilequeue.h" @@ -5983,6 +5984,26 @@ void handle_facebook_connect() } } +void handle_facebook_checkin() +{ + + // Get the location SLURL + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + std::string slurl_string = slurl.getSLURLString(); + + //Get the location name + LLViewerParcelMgr * parcel = LLViewerParcelMgr::getInstance(); + std::string parcel_string = parcel->getAgentParcelName(); + + //Get the location description + LLVector3 agent_pos = gAgent.getPositionAgent(); + std::string description; + LLAgentUI::buildLocationString(description, LLAgentUI::LOCATION_FORMAT_FULL, agent_pos); + + LLFacebookConnect::instance().postCheckin(slurl_string, parcel_string, description, "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDL4jdC_vCh0ow-QCXZjN-WNojEXWiz0APEa6Qhpl8cxawjkoC7w", ""); +} + //bool is_facebook_connected(); @@ -8738,4 +8759,6 @@ void initialize_menus() // Facebook Connect commit.add("Facebook.Connect", boost::bind(&handle_facebook_connect)); + // Facebook Checkin + commit.add("Facebook.Checkin", boost::bind(&handle_facebook_checkin)); } |