 					error: res.error
 					module: 'facebook'
 			else
-				query.onSuccess
-					title: res.name
-					description: res.description
-					source: ''
-					date: new Date(res.start_time).getTime()
-					location: ''
+
+				db.set 
+					events: [
+						title: res.name
+						#description: res.description
+						source: query.url
+						date: new Date(res.start_time).getTime()
+						location: ''
+					]
+					onSuccess: query.onSuccess
+					onError: query.onError
 
 # Import and url
 # @param [object] query

# @option query [function] onError
exports.handle = (query) ->
	eventId = _getEventId(query.url)
	if @canHandle(query.url) and eventId 
		query.eventId = eventId
		_getEvent(query)

	else
		query.onError
			error: new Error("Could not get handle query url (#{query.url})")
			module: 'facebook'

# if exports.canHandle 'https://www.facebook.com/events/344493149083407/'
# 	exports.handle 

	throw new Error('facebook module config missing')

fb = require 'fb'
db = require 'db'

fb.options
	appId: config.appId
