Changed friend function to post
Changed key reference in sql to token to match database