diff options
-rw-r--r-- | indra/newview/llfacebookconnect.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llfacebookconnect.h | 2 | ||||
-rwxr-xr-x | indra/newview/llpanelpeople.cpp | 2 |
3 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index eb70cf4d10..86da748f0f 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -276,18 +276,24 @@ void LLFacebookConnect::loadFacebookFriends() LLSD(), timeout, follow_redirects); } -void LLFacebookConnect::postCheckinMessage(const std::string& message, const std::string& url) +void LLFacebookConnect::postCheckinMessage(const std::string& message, const std::string& link, const std::string& name, const std::string& caption, const std::string& description, const std::string& picture) { - // Note: We need to improve the API support to provide all the relevant data if possible - // Full set described : http://facebook-python-library.docs-library.appspot.com/facebook-python/library-manual.html - LLSD body; + LLSD body; if (!message.empty()) body["message"] = message; - if (!url.empty()) - body["link"] = url; + if (!link.empty()) + body["link"] = link; + if (!name.empty()) + body["name"] = name; + if (!caption.empty()) + body["caption"] = caption; + if (!description.empty()) + body["description"] = description; + if (!picture.empty()) + body["picture"] = picture; // Note: we can use that route for different publish action. We should be able to use the same responder. - LLHTTPClient::post(getFacebookConnectURL("/share"), body, new LLFacebookPostResponder()); + LLHTTPClient::post(getFacebookConnectURL("/share/wall"), body, new LLFacebookPostResponder()); } void LLFacebookConnect::storeContent(const LLSD& content) diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index f151dd95c1..8886630222 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -46,7 +46,7 @@ public: void getConnectionToFacebook(); void loadFacebookFriends(); - void postCheckinMessage(const std::string& message, const std::string& url); + void postCheckinMessage(const std::string& message, const std::string& link, const std::string& name, const std::string& caption, const std::string& description, const std::string& picture); void clearContent(); void storeContent(const LLSD& content); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index e0b1c3abba..69b6bdf737 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1726,7 +1726,7 @@ void LLPanelPeople::onFacebookCheckinClicked() LLSLURL slurl; LLAgentUI::buildSLURL(slurl); - LLFacebookConnect::instance().postCheckinMessage("Here I am in SL!", slurl.getSLURLString()); + LLFacebookConnect::instance().postCheckinMessage("Here I am in SL!", slurl.getSLURLString(), slurl.getRegion(), "", "", ""); } void LLPanelPeople::onFacebookAppRequestClicked() |