mercredi 25 février 2015

Passing scrap = true to facebook API

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 scrap 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('http://ift.tt/wljqS4', { // This line does nothing for me what so ever
id: 'http://ift.tt/1FqcwLU',
scrape: true
},
function (response) {
console.log(response);
}
);
</script>


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


I've only been trying to use this facebook for a day or two now so please bare with me.


Aucun commentaire:

Enregistrer un commentaire