def is_facebook_bot(request):
    """Check the request's User-Agent against the Facebook bot's User-Agent."""
    ua = request.META.get('HTTP_USER_AGENT', '')
    return ua.startswith('facebookexternalhit')