public/js/pipe.js
function fetchImagesForFbGallery(id){

    $
    .get('/facebook/get_photos_from_album_id?id='+id)
    .success(function(d, resp, x){ 

      console.dir(d)

      var thumbs = ""

      if(d.message) thumbs += "<p>"+d.message+"</p>"
      else{
        d.data.forEach(function(el,i){
          // console.dir(el)
          thumbs += "<img data-standard-resolution='"+el.images[2].source+"' src='"+el.picture+"' />"
        })
      }

      $oneUpFacebookWrapper
        .before(thumbs)
      
      $photoPickerFacebook
        .show()

      $spin
        .hide()
        
      // wire up the images int the fb gallery
      wireFacebookGalleryPicker()  

      progressToNextStep($stepTwo, function(){

        $stepThree.slideDown(333)

      })

    })
    .error(function(e){ 
      if(e.status === 404) alert(e.responseText || 'Images were not found.')
      if(e.status === 403) alert(e.responseText || 'That request was not allowed.')
      if(e.status === 500) alert(e.responseText || 'Something went really wrong.')
    })

  }
function fetchImagesForFbGallery(id){

    $
    .get('/facebook/get_photos_from_album_id?id='+id)
    .success(function(d, resp, x){ 

      console.dir(d)

      var thumbs = ""

      if(d.message) thumbs += "<p>"+d.message+"</p>"
      else{
        d.data.forEach(function(el,i){
          // console.dir(el)
          thumbs += "<img data-standard-resolution='"+el.images[2].source+"' src='"+el.picture+"' />"
        })
      }

      $oneUpFacebookWrapper
        .before(thumbs)
      
      $photoPickerFacebook
        .show()

      $spin
        .hide()
        
      // wire up the images int the fb gallery
      wireFacebookGalleryPicker()  

      progressToNextStep($stepTwo, function(){

        $stepThree.slideDown(333)

      })

    })
    .error(function(e){ 
      if(e.status === 404) alert(e.responseText || 'Images were not found.')
      if(e.status === 403) alert(e.responseText || 'That request was not allowed.')
      if(e.status === 500) alert(e.responseText || 'Something went really wrong.')
    })

  }
function fetchImagesForFbGallery ( id ) { $ . get ( '/facebook/get_photos_from_album_id?id=' + id ) . success ( function ( d , resp , x ) { console . dir ( d ) var thumbs = "" if ( d . message ) thumbs += "<p>" + d . message + "</p>" else { d . data . forEach ( function ( el , i ) { // console.dir(el) thumbs += "<img data-standard-resolution='" + el . images [ 2 ] . source + "' src='" + el . picture + "' />" } ) } $oneUpFacebookWrapper . before ( thumbs ) $photoPickerFacebook . show ( ) $spin . hide ( ) // wire up the images int the fb gallery wireFacebookGalleryPicker ( ) progressToNextStep ( $stepTwo , function ( ) { $stepThree . slideDown ( 333 ) } ) } ) . error ( function ( e ) { if ( e . status === 404 ) alert ( e . responseText || 'Images were not found.' ) if ( e . status === 403 ) alert ( e . responseText || 'That request was not allowed.' ) if ( e . status === 500 ) alert ( e . responseText || 'Something went really wrong.' ) } ) }
Initial fetch of fb galleries
Initial fetch of fb galleries