diff options
author | Cho <cho@lindenlab.com> | 2013-06-08 00:48:46 +0100 |
---|---|---|
committer | Cho <cho@lindenlab.com> | 2013-06-08 00:48:46 +0100 |
commit | 54e879cc22ec342f57cec23d38ba269b83489111 (patch) | |
tree | 6d409c356b86f8c493cb8d9d277d84aa4cf58e54 /indra/newview/llviewermenu.cpp | |
parent | bee5369b2f2fc0208b1a0645c2702ed1cea43c55 (diff) |
added Facebook status update feature for ACME-502, ACME-503, and ACME-504
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rwxr-xr-x | indra/newview/llviewermenu.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1bfa5ac2d1..67460c4bc6 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6005,6 +6005,23 @@ void handle_facebook_checkin() LLFacebookConnect::instance().postCheckin(slurl_string, region_name, description, locationMap, ""); } +bool handle_facebook_status_callback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) + { + std::string message = response["message"].asString(); + if (!message.empty()) + LLFacebookConnect::instance().updateStatus(message); + } + return false; +} + +void handle_facebook_status() +{ + LLNotificationsUtil::add("FacebookUpdateStatus", LLSD(), LLSD(), boost::bind(&handle_facebook_status_callback, _1, _2)); +} + void handle_buy_currency() { LLBuyCurrencyHTML::openCurrencyFloater(); @@ -8761,4 +8778,7 @@ void initialize_menus() // Facebook Checkin commit.add("Facebook.Checkin", boost::bind(&handle_facebook_checkin)); + + // Facebook Status Update + commit.add("Facebook.UpdateStatus", boost::bind(&handle_facebook_status)); } |