From ea06cf4b110362b9e4cb86e07d65139521a1533e Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 27 Nov 2016 13:51:42 -0500 Subject: Updated verbly & libtwitter++ to remove dependence on json submodule --- composite.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'composite.cpp') diff --git a/composite.cpp b/composite.cpp index bac075c..49a2301 100644 --- a/composite.cpp +++ b/composite.cpp @@ -29,14 +29,15 @@ int main(int argc, char** argv) std::string output = "Full Metal " + noun; std::cout << output << std::endl; - twitter::tweet sent; - twitter::response resp = client.updateStatus(output, sent); - if (resp != twitter::response::ok) + try { - std::cout << "Twitter error: " << resp << std::endl; + client.updateStatus(output); + } catch (const twitter::twitter_error& e) + { + std::cout << "Twitter error: " << e.what() << std::endl; } std::cout << "Waiting..." << std::endl; std::this_thread::sleep_for(std::chrono::hours(1)); } -} \ No newline at end of file +} -- cgit 1.4.1