Facebook Share not scrapping image on first try, but on second try after caching happens -


i have implemented share button uses sharer.php method. image not scrapped on first try, after second try. assume after has been cached facebook servers.

here's url , happens when click on share button

http://viddsee.com/video.php?video=wild_fire_2011

https://www.facebook.com/sharer/sharer.php?u=http%3a%2f%2fviddsee.com%2fvideo.php%3fvideo%3dwild_fire_2011

any appreciated!

derek

i found not-so-elegant workaround problem. found out didn't happens when used facebook scrapper (debugger) before trying share new link, started searching way before user shares link.

this solution, works 80% of time (jquery):

$.post("https://graph.facebook.com/?id="+encodeuricomponent(url_to_be_shared)+"&scrape=true",     function(contents){         //here facebook share code     }); 

this fails no response @ all, might want add this:

$.post("https://graph.facebook.com/?id="+encodeuricomponent(url_to_be_shared)+"&scrape=true",     function(contents){         //here facebook share code     }).fail(function(){         //call function again if failed     }); 

like said, not-elegant solution, , works around 80% of time, maximize did less elegant solution , nested 3 (yea, three) post calls facebook graph api, takes 2 - 5 seconds complete 3 calls, it's something. after doing thought maybe check ajax.post response check if changes when doesn't find image, iterate on that, haven't found time that, if end checking up, let me know.

regards


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -