| 100 | } |
| 101 | |
| 102 | connect (options) { |
| 103 | if (options == null) { options = {} } |
| 104 | if (options.success == null) { options.success = _.noop } |
| 105 | if (options.context == null) { options.context = options } |
| 106 | return FB.login(response => { |
| 107 | if (response.status === 'connected') { |
| 108 | this.connected = true |
| 109 | this.trigger('connect', { response }) |
| 110 | return options.success.bind(options.context)(response) |
| 111 | } |
| 112 | } |
| 113 | , { scope: 'email' }) |
| 114 | } |
| 115 | |
| 116 | loadPerson (options) { |
| 117 | if (options == null) { options = {} } |