Forcing facebook to take whatsapp images.
This commit is contained in:
parent
556b8bb4d1
commit
615994e817
@ -26,6 +26,7 @@ sub get_attribute_preview ($self) {
|
||||
}
|
||||
|
||||
my $is_whatsapp = $self->req->headers->user_agent =~ /whatsapp/i;
|
||||
$is_whatsapp ||= $self->req->headers->user_agent =~ /facebook/i;
|
||||
my $data;
|
||||
if ($is_whatsapp) {
|
||||
$data = BurguillosInfo::Preview->WhatsappAlternativeGenerate(
|
||||
|
@ -172,6 +172,7 @@ sub get_category_preview {
|
||||
}
|
||||
my $category = $categories->{$category_slug};
|
||||
my $is_whatsapp = $self->req->headers->user_agent =~ /whatsapp/i;
|
||||
$is_whatsapp ||= $self->req->headers->user_agent =~ /facebook/i;
|
||||
$self->render(
|
||||
format => 'png',
|
||||
data => $category_model->PreviewOg( $category, $is_whatsapp )
|
||||
@ -188,6 +189,7 @@ sub get_post_preview {
|
||||
return;
|
||||
}
|
||||
my $is_whatsapp = $self->req->headers->user_agent =~ /whatsapp/i;
|
||||
$is_whatsapp ||= $self->req->headers->user_agent =~ /facebook/i;
|
||||
say $self->req->headers->user_agent;
|
||||
my $post = $posts_slug->{$slug};
|
||||
$self->render(
|
||||
|
Loading…
Reference in New Issue
Block a user