diff --git a/src/main/lemondronor/circlebot/twitter.cljs b/src/main/lemondronor/circlebot/twitter.cljs index 6dab93a..9b9e6e2 100644 --- a/src/main/lemondronor/circlebot/twitter.cljs +++ b/src/main/lemondronor/circlebot/twitter.cljs @@ -35,13 +35,17 @@ ;; Posts a tweet with optional multiple media. Returns a promise that ;; resolves to the response result. -(defn tweet [twit status image-paths] +(defn tweet [twit status image-paths lat long] (p/then (p/all (map #(upload-image twit %) image-paths)) (fn [media-ids] (log-info "Tweeting status:'%s' with media: %s" status media-ids) (p/let [result (.post twit "statuses/update" (clj->js {:status status - :media_ids [media-ids]})) + :media_ids [media-ids] + :lat lat + :long long + :display_coordinates true + })) result (js->clj result :keywordize-keys true)] - (log-info "Tweet posted") + (log-info "Tweet posted: %s" result) result))))