Move ajax into fb api callback