From abcb3e85628712da4d61fda6e68bb86a29e1f965 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 4 Jun 2013 18:39:41 -0700 Subject: 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 --- indra/newview/llviewermenu.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') 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)); } -- cgit v1.2.3