summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotfacebook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelsnapshotfacebook.cpp')
-rwxr-xr-xindra/newview/llpanelsnapshotfacebook.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llpanelsnapshotfacebook.cpp b/indra/newview/llpanelsnapshotfacebook.cpp
index 200c64f16b..56b1f921b9 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");
@@ -98,9 +99,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);
+ }
+}