如何更新Facebook打开图形图像 [英] How to update facebook open graph image

查看:84
本文介绍了如何更新Facebook打开图形图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说,如果您已通过开放图谱协议的meta标记为网页设置了Facebook图像,如下所示: <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

Say if you have set the facebook image for your webpage via the meta tag of the open graph protocol like this: <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

如果您想用另一个具有相同名称rock.jpg的图像替换/更新该图像,当共享页面时,如何使facebook用新图像相应地更新您的图像?强制Facebook通过此链接 http://developers.facebook.com/tools/debug 来获取页面数据更新图像.

If you want to replace/update the image with another image of the same name rock.jpg, how do you get facebook to update your image accordingly with the new image when you share the page? Forcing facebook to fetch your page's data with this link http://developers.facebook.com/tools/debug won't update the image.

推荐答案

这是我找到的最一致的答案: https://stackoverflow.com/a/21468084/339698

this is the most consistent answer I've found to this problem: https://stackoverflow.com/a/21468084/339698

如果您懒于访问该链接,则可以POST使用您要清除的网址 ajax请求:

If you're too lazy to go to that link, you can POST an ajax request with the url you are trying to clear:

$.post(
    'https://graph.facebook.com',
    {
        id: 'http://www.site.com/my/share/url/',
        scrape: true
    },
    function(response){
        console.log(response);
    }
);

这篇关于如何更新Facebook打开图形图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆