Andres Iniesta was given an emotional send-off in his final game for Barcelona after 22 years at the club.