Adding thumbnails and sorting urls for facebook