added code for fb api