tmort / Socialite

Other
1.68k stars 164 forks source link

Added support for Facebook Share button #73

Closed rhodimus closed 10 years ago

rhodimus commented 10 years ago

Added support for Facebook Share button (https://developers.facebook.com/docs/plugins/share-button/).

Requires use of class "facebook-share" and additional data attribute of "data-type" for button type (data attribute difference is Facebook's doing not mine...)

adasite commented 10 years ago

Can someone write the facebook share button markup for socialite.js? The code below does not work properly:

<a href="http://www.facebook.com/sharer.php?u=url&=post_title" class="socialite facebook-share" data-href="url" data-send="true" data-layout="box_count" data-type="button_count" data-width="60" data-show-faces="false" rel="external nofollow"><span class="hidden">Share on Facebook</span></a>
rhodimus commented 10 years ago

Your code works for me: http://jsfiddle.net/AhpFU/

Are you using my fork of Socialite? At least until it gets merged.

adasite commented 10 years ago

Sorry, it's my fault, I directly used the code you provided via jsfiddle and Facebook Share button appeared now. However I'm not sure that it works as it's expected. All buttons appear directly, no mouse hover or scroll needed. Sorry for my terrible English sir, I think I'm missing something :) Here is a sample page: http://www.fragmansal.com/374/karadayi-59-bolum-fragmani.html

hgani commented 10 years ago

@rhodimus May I know what is the URL of your fork?

Thanks

rhodimus commented 10 years ago

Its here: https://github.com/rhodimus/Socialite/ and the exact changes are linked above in this thread.

@adasite - that all looks ok to me, are you trying to add a mouse hover/scroll?

aleemb commented 10 years ago

+1 would be good to see this merged

adasite commented 10 years ago

rhodimus, I just want to be sure that social buttons load asynchronously. Your fork probably do this. This discussion is my fault as I thought your fork is already merged, sorry.

tmort commented 10 years ago

rhodimus, Appreciate you contribution. Seeing this thread light up made me immediately pull it into socialite. Hope this helps everyone when checking out the source!

cubicova17 commented 10 years ago

@tmort it would be also nice to update a paragraph describing his change on http://socialitejs.com/