0

Due to the nature of my page I need to re-scrap it every time the page is hit, I have found this thread Re scrape URL

My current javascript is as follows

 <script>

    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s);
        js.id = id;
        js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.0";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));

    $.post('https://graph.facebook.com', { // This line does nothing for me what so ever
        id: 'http://danone.staging-eurorscg.com.au/thank-you',
        scrape: true
    },
    function (response) {
       console.log(response);
    }
);
</script>

But when I run the $.post method nothing happens it still remembers the previous image.

Code Ratchet
  • 5,758
  • 18
  • 77
  • 141
  • 1
    Why do you want to update every share that ever happen every time someone hits it? That sounds crazy – WizKid Feb 26 '15 at 04:09
  • @WizKid I'm trying to get my head around this facebook share functionality, how it stands at the moment say ten people came on to the site all done a different combination which would result in ten different images to be shown in the dialog. When I do it the first time I see the correct combination image in the share dialog, if I go back and create a new combination as facebook has scrapped that page and caches it for 24 hours the meta data gets updated but it does not update the image in the share dialog, instead facebook takes it from the cache that's the problem I'm experiencing. – Code Ratchet Feb 26 '15 at 04:16

0 Answers0