如何随机修改linkedin不显示共享帖子图片?

问题描述 投票:-1回答:1

我有一个带有blog2social插件的wordpress网站。当我们写一篇文章时,该插件会分享帖子摘录和图像并链接到社交媒体。图像尺寸为1000x500。我看到linkedin需要1.91:1的比例。所以我将我的模板php和css文件更改为1000x525。但问题是,即使使用1000x500像素,图像也能正确共享。但大部分时间都有1x1像素被选中用于图像发布。而不是实际的帖子特色图像。我也让我的服务器加密ssl所以我读了一些主题,可能是ssl连接问题。但如果这些是为什么一些帖子与正确的图像共享的问题呢?我也尝试了链接ispector,并从og:image中选择了正确的图像

所以所有帖子的图片大小都是一样的。一些帖子分享和正确查看,一些显示灰色块而不是图像。

我允许在我的服务器防火墙中使用linkedin IP v4列表。所以可能没有连接问题。元标记是正确的。链接检查器显示正确的OG:图像格式。

我该怎么办?

尝试链接ispector,尝试调整图像大小。尝试允许linkedin cdn ip range。

<meta property="og:image" content="https://---domain---/wp-content/uploads/2019/04/2019-04-05.png">
<meta property="og:image:secure_url" content="https://---domain---/wp-content/uploads/2019/04/2019-04-05.png">
<meta name="twitter:image" content="https://---domain---/wp-content/uploads/2019/04/2019-04-05.png">
<meta property="og:image" content="https://---domain---/wp-content/uploads/2019/04/2019-04-05.png">

其他社交媒体,如Facebook,Twitter,Instagram,电报等都没有问题。只是链接是随机失败。

wordpress linkedin
1个回答
0
投票

我拥有一个wordpress防火墙和安全插件。并启用了5g规则。我禁用了一些规则。和linkedin图像开始工作。我认为这个htaccess规则是如何阻止linkedin crawler的。但不是twitter或facebook或insta:

#AIOWPS_SIX_G_BLACKLIST_END
#AIOWPS_FIVE_G_BLACKLIST_START
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/

# 5G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (\"|%22).*(<|>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (\\|\.\./|`|='$|=%27$) [NC,OR]
RewriteCond %{QUERY_STRING} (\;|'|\"|%22).*(union|select|insert|drop|update|md5|benchmark|or|and|if) [NC,OR]
RewriteCond %{QUERY_STRING} (base64_encode|localhost|mosconfig) [NC,OR]
RewriteCond %{QUERY_STRING} (boot\.ini|echo.*kae|etc/passwd) [NC,OR]
RewriteCond %{QUERY_STRING} (GLOBALS|REQUEST)(=|\[|%) [NC]
RewriteRule .* - [F]
</IfModule>

# 5G:[USER AGENTS]
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ keep_out
SetEnvIfNoCase User-Agent (binlar|casper|cmsworldmap|comodo|diavol|dotbot|feedfinder|flicky|ia_archiver|jakarta|kmccrew|nutch|planetwork|purebot|pycurl|skygrid|sucker|turnit|vikspider|zmeu) keep_out
<limit GET POST PUT>
Order Allow,Deny
Allow from all
Deny from env=keep_out
</limit>
</IfModule>

# 5G:[REQUEST STRINGS]
<IfModule mod_alias.c>
RedirectMatch 403 (https?|ftp|php)\://
RedirectMatch 403 /(https?|ima|ucp)/
RedirectMatch 403 /(Permanent|Better)$
RedirectMatch 403 (\=\\\'|\=\\%27|/\\\'/?|\)\.css\()$
RedirectMatch 403 (\,|\)\+|/\,/|\{0\}|\(/\(|\.\.\.|\+\+\+|\||\\\"\\\")
RedirectMatch 403 \.(cgi|asp|aspx|cfg|dll|exe|jsp|mdb|sql|ini|rar)$
RedirectMatch 403 /(contac|fpw|install|pingserver|register)\.php$
RedirectMatch 403 (base64|crossdomain|localhost|wwwroot|e107\_)
RedirectMatch 403 (eval\(|\_vti\_|\(null\)|echo.*kae|config\.xml)
RedirectMatch 403 \.well\-known/host\-meta
RedirectMatch 403 /function\.array\-rand
RedirectMatch 403 \)\;\$\(this\)\.html\(
RedirectMatch 403 proc/self/environ
RedirectMatch 403 msnbot\.htm\)\.\_
RedirectMatch 403 /ref\.outcontrol
RedirectMatch 403 com\_cropimage
RedirectMatch 403 indonesia\.htm
RedirectMatch 403 \{\$itemURL\}
RedirectMatch 403 function\(\)
RedirectMatch 403 labels\.rdf
RedirectMatch 403 /playing.php
RedirectMatch 403 muieblackcat
</IfModule>

# 5G:[REQUEST METHOD]
<ifModule mod_rewrite.c>
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
#AIOWPS_FIVE_G_BLACKLIST_END

所以现在我认为403是由其中一条规则引发的。

© www.soinside.com 2019 - 2024. All rights reserved.