This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with-facebook-auth {:access-token "134211159981787|2._UqBc68omALVTLR_FM6DZg__.3600.129951..."} | |
(client/get "https://graph.facebook.com/me/friends")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clj-facebook-graph.example> (with-facebook-auth-by-name "Max Weber" (client/get [:me :friends])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clj-facebook-graph.example> (with-facebook-auth-by-name "Max Weber" (client/get [:me :home])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clj-facebook-graph.example> (with-facebook-auth-by-name "Max Weber" | |
(client/get [:me :likes] {:query-params {:limit 2} :extract :data :paging true})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://localhost:8080/albums/Max_Mustermann | |
http://localhost:8080/albums/me |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def facebook-app-info {:client-id "107582059321384" | |
:client-secret "2022b10bce2b619aa9aee7b8a5f13aa7" | |
:redirect-uri "http://localhost:8080/facebook-callback" | |
:permissions ["user_photos" "friends_photos"]}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns path.core | |
(:use clojure.test) | |
(:require [clojure.string :as s])) | |
(defn clean-component [component] | |
(s/replace component #"/+" "")) | |
(defn path-prefix [components] | |
(if (re-find #"/+" (first components)) | |
"/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns prototype.graph | |
(:use vijual) | |
(:import [javax.swing JFrame JLabel] | |
java.awt.image.BufferedImage | |
java.awt.Dimension)) | |
(defn draw [] | |
(let [frame (new JFrame) | |
image (draw-tree-image [[:north-america [:usa [:miami] [:seattle] [:idaho [:boise]]]] [:europe [:germany] [:france [:paris] [:lyon] [:cannes]]]]) | |
canvas (proxy [JLabel] [] (paint [g] (.drawImage g image 0 0 this))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def app-state | |
(atom {:form {:email {:label "Email" | |
:error "invalid email" | |
:value "[email protected]"}}})) | |
(defn form-element [key] | |
(reagent/cursor app-state [:form key])) | |
(def cur (form-element :email)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def data [[1 2] [11 22] [111 222]]) | |
(defn combine [a b] | |
(mapcat | |
(fn [x] | |
(map | |
(fn [y] | |
(flatten [x y])) | |
b)) | |
a)) |