comparison src/facebook.coffee @ 27:f27ddfa42e94

try/catch; From/To/-ESN changes; google probs
author Mathias Gebbe <mgebbe@intevation.de>
date Sat, 28 Jun 2014 13:08:40 +0200
parents 08d9679da0f7
children 3e3fa35e3ce2
comparison
equal deleted inserted replaced
26:cdbc77880565 27:f27ddfa42e94
334 if not res or res.error 334 if not res or res.error
335 console.log (if not res then "error occurred" else res.error) 335 console.log (if not res then "error occurred" else res.error)
336 callback null, null 336 callback null, null
337 337
338 newposts = new Array() 338 newposts = new Array()
339 async.each res.data, ((post,cb) -> 339
340 newposts.push(post) if (post.type is 'status' or post.type is 'photo' or post.type is 'link' or post.type is 'video') and (post.status_type is 'mobile_status_update' or post.status_type is 'added_photos' or post.status_type is 'shared_story') 340 if res.data?
341 cb() 341 async.each res.data, ((post,cb) ->
342 return 342 if (post.type is 'status' or post.type is 'photo' or post.type is 'link' or post.type is 'video') and (post.status_type is 'mobile_status_update' or post.status_type is 'added_photos' or post.status_type is 'shared_story')
343 ), (err) -> 343 newposts.push(post)
344 callback null, newposts.reverse() 344 cb()
345 return 345 ), (err) ->
346 callback null, newposts.reverse()
347 else
348 callback null,null
346 return 349 return
347 350
348 ####################################### 351 #######################################
349 ###### post facebook stream ###### 352 ###### post facebook stream ######
350 ####################################### 353 #######################################
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)