dimanche 29 mars 2015

Facebook Open Graph Share Dialog Working Example

I've been looking for a working example code of Facebook OG Share Dialog. Every example I have found works occasionally, but every now & again the window size bugs out.


Here is one website example: http://ift.tt/19kmIvt


As for myself, I am currently using the older sharer.php:



<script type="text/javascript">
jQuery.noConflict();
$(document).ready(function(){
var myWebsiteUrl='http://ift.tt/tv1JJF';
$('.facebook-share').click(function(e){
e.preventDefault;
window.open('http://ift.tt/GEAWBQ'+myWebsiteUrl,'mywin',
'width=500,height=330,toolbar=1');
});
});
</script>


So back to the bug; the window size starts small than snaps to a larger size (sometimes the full screen size), and then the window size rubberbands for awhile. Alos, sometimes the popup shows the OG description, sometimes it doesn't in the sharer.php version. If you have any specific recommendations, that would be fantastic.


Ideally, I would go by the SDK and get a channelURL into my website, but I don't presently have access to do that, hence this specific question. Greatly appreciate any assistance!


Aucun commentaire:

Enregistrer un commentaire