Product placement
Ted (the teddy bear) ACTS as a character in the video, and its presence is central to the humor and plot. Removing it would fundamentally change the video. Facebook (the social media platform) APPEARS when a character says they will post a video to it. Removing it would not change what happens in the video.