facebook sdk for cljs
Feature.
-
just facebook sdk.js wrapper.
-
all response callback data converted by
(js->clj response :keywordize-keys true)
-
all input dictionary data converted by
(clj->js dicionary)
Usage
(fb/get-login-status
(fn [response]
(case (:status response)
"connected"
(.log js/console "connected")
;; else
(fb/login #(.log js/console "else-" %) {:scope "email"}))))
Known bug
example.
please check this file - https://github.com/netpyoung/fb-sdk-cljs/blob/master/test/fb_sdk_cljs/api_test.cljs
Debuging this project
boot dev
in command line.- connect
https://localhost:3443/
- clojure repl connect
- connect cljs repl (https://github.com/adzerk-oss/boot-cljs-repl)
boot.user=> (start-repl)
Externs.
Api
-
Core Method
-
Facebook Login Methods
- get-login-status - FB.getLoginStatus
- login()
- logout()
- get-auth-response - FB.getAuthResponse
-
Event Handling Methods
- Event:subscribe - FB.Event.subscribe
- Event:unsubscribe - FB.Event.unsubscribe
-
XFBML Methods
- XFBML:parse - FB.XFBML.parse
-
Canvas Methods
- Canvas!Prefetcher:add-static-resource - FB.Canvas.Prefetcher.addStaticResource
- Canvas!Prefetcher:set-collection-mode - FB.Canvas.Prefetcher.setCollectionMode
- Canvas:hide-flash-element - [FB.Canvas.hideFlashElement]
- Canvas:show-flash-element - [FB.Canvas.showFlashElement]
- Canvas:scroll-to - [FB.Canvas.scrollTo]
- Canvas:get-page-info - FB.Canvas.getPageInfo
- Canvas:set-done-loading - FB.Canvas.setDoneLoading
- Canvas:set-auto-grow - FB.Canvas.setAutoGrow
- Canvas:set-size - FB.Canvas.setSize
- Canvas:set-url-handler - FB.Canvas.setUrlHandler
- Canvas:start-timer - FB.Canvas.startTimer
- Canvas:stop-timer - FB.Canvas.stopTimer
TODO
- docker
- headless browser test