Man accused of murder ‘used Facebook Messenger to tell his friend he killed someone’ as court hears of social media exchanges