update code for facebook