mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-17 19:12:33 -05:00
Update FB API to v2.7
We were on v2.0, which is being deprecated on August 8th
This commit is contained in:
parent
f1f020a50d
commit
1064d64172
1 changed files with 4 additions and 3 deletions
|
@ -55,7 +55,7 @@ module.exports = FacebookHandler = class FacebookHandler extends CocoClass
|
||||||
js = d.createElement('script')
|
js = d.createElement('script')
|
||||||
js.id = id
|
js.id = id
|
||||||
js.async = true
|
js.async = true
|
||||||
js.src = '//connect.facebook.net/en_US/all.js'
|
js.src = '//connect.facebook.net/en_US/sdk.js'
|
||||||
|
|
||||||
#js.src = '//connect.facebook.net/en_US/all/debug.js'
|
#js.src = '//connect.facebook.net/en_US/all/debug.js'
|
||||||
ref.parentNode.insertBefore js, ref
|
ref.parentNode.insertBefore js, ref
|
||||||
|
@ -63,12 +63,13 @@ module.exports = FacebookHandler = class FacebookHandler extends CocoClass
|
||||||
)(document)
|
)(document)
|
||||||
|
|
||||||
window.fbAsyncInit = =>
|
window.fbAsyncInit = =>
|
||||||
FB.init
|
FB.init({
|
||||||
appId: (if document.location.origin is 'http://localhost:3000' then '607435142676437' else '148832601965463') # App ID
|
appId: (if document.location.origin is 'http://localhost:3000' then '607435142676437' else '148832601965463') # App ID
|
||||||
channelUrl: document.location.origin + '/channel.html' # Channel File
|
channelUrl: document.location.origin + '/channel.html' # Channel File
|
||||||
cookie: true # enable cookies to allow the server to access the session
|
cookie: true # enable cookies to allow the server to access the session
|
||||||
xfbml: true # parse XFBML
|
xfbml: true # parse XFBML
|
||||||
|
version: 'v2.7'
|
||||||
|
})
|
||||||
FB.getLoginStatus (response) =>
|
FB.getLoginStatus (response) =>
|
||||||
if response.status is 'connected'
|
if response.status is 'connected'
|
||||||
@connected = true
|
@connected = true
|
||||||
|
|
Loading…
Reference in a new issue