MCPcopy Create free account
hub / github.com/codecombat/codecombat / fakeAPI

Method fakeAPI

app/core/social-handlers/FacebookHandler.js:40–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 token () { return null }
39
40 fakeAPI () {
41 window.FB = {
42 login (cb, options) {
43 return cb({ status: 'connected', authResponse: { accessToken: '1234' } }) // eslint-disable-line n/no-callback-literal
44 },
45 // eslint-disable-next-line n/no-callback-literal
46 api (url, options, cb) {
47 return cb({ // eslint-disable-line n/no-callback-literal
48 first_name: 'Mr',
49 last_name: 'Bean',
50 id: 'abcd',
51 email: 'some@email.com'
52 })
53 }
54 }
55
56 this.startedLoading = true
57 this.apiLoaded = true
58 }
59
60 loadAPI (options) {
61 if (options == null) { options = {} }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected