created a function to retrieve liked posts info