javascript - Programatically scrape Facebook meta tags -
i making "generate ___ name" generator , having trouble facebook share portion.
basically user fills out form gets results. first idea have results in iframe have unique url because of parameters, generated correct facebook share info. problem link shared go directly "results" iframe.
i decided instead keep on 1 page, , submit form via post, reload page , show results. if there no post data, shows default page. problem re-scraping facebook data in order share correct "generated" image. (programatically, not @ https://developers.facebook.com/tools/debug/). found script below supposed that, haven't had luck.
does know of alternative way of doing show correct "generated" image in facebook link original page others can generate own name?
this example here it, haven't been able reverse-engineer doing: http://www.zimbio.com/generator/d_rn-gyttd2/what's+your+'game+of+thrones'+warrior+name
<meta property="og:title" content="title"/> <meta property="og:description" content="description" /> <meta property="og:url" content="url" /> <meta property="og:image" content="image url"/> <meta property="fb:app_id" content="fb app id" /> <script> $.post( 'https://graph.facebook.com', { id: 'url here', scrape: true }, function(response){ console.log(response); } ); </script>
Comments
Post a Comment