diff options
author | Merov Linden <merov@lindenlab.com> | 2013-06-05 21:29:12 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-06-05 21:29:12 -0700 |
commit | 3680f0332fa0e7262315d52fbd204beb2ecbc782 (patch) | |
tree | b70984a4ca5f146715bf901ec6bb5b57b6fbd051 /indra/newview/llpanelsnapshotfacebook.cpp | |
parent | ba90e388855f99ec5b3f1991f2437f616a5d9e62 (diff) | |
parent | 13c61d13eadaa1dab6a98385421aa56f4ba362b0 (diff) |
Pull merge from viewer-fbc
Diffstat (limited to 'indra/newview/llpanelsnapshotfacebook.cpp')
-rwxr-xr-x | indra/newview/llpanelsnapshotfacebook.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llpanelsnapshotfacebook.cpp b/indra/newview/llpanelsnapshotfacebook.cpp index 27abbfa456..b434741538 100755 --- a/indra/newview/llpanelsnapshotfacebook.cpp +++ b/indra/newview/llpanelsnapshotfacebook.cpp @@ -64,6 +64,7 @@ private: /*virtual*/ void updateControls(const LLSD& info); void onSend(); + void onImageUploaded(const std::string& caption, const std::string& image_url); }; static LLRegisterPanelClassWrapper<LLPanelSnapshotFacebook> panel_class("llpanelsnapshotfacebook"); @@ -99,9 +100,17 @@ void LLPanelSnapshotFacebook::onSend() std::string caption = getChild<LLUICtrl>("caption")->getValue().asString(); bool add_location = getChild<LLUICtrl>("add_location_cb")->getValue().asBoolean(); - LLWebProfile::uploadImage(LLFloaterSnapshot::getImageData(), caption, add_location); + LLWebProfile::uploadImage(LLFloaterSnapshot::getImageData(), caption, add_location, boost::bind(&LLPanelSnapshotFacebook::onImageUploaded, this, caption, _1)); LLFloaterSnapshot::postSave(); // test with a placeholder image, until we can figure out a way to grab the uploaded image url LLFacebookConnect::instance().sharePhoto("http://fc02.deviantart.net/fs43/i/2009/125/a/9/Future_of_Frog_by_axcho.jpg", caption); } + +void LLPanelSnapshotFacebook::onImageUploaded(const std::string& caption, const std::string& image_url) +{ + if (!image_url.empty()) + { + LLFacebookConnect::instance().sharePhoto(image_url, caption); + } +} |