Ezt másold a <body> után:
PHP kód:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR APP ID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/hu_HU/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
Kérj APP ID-t és rakd a fenti kódba. http://developers.facebook.com/setup/
Ez lesz a megoszt gomb:
PHP kód:
<fb:share-button href="URL" type="button_count"></fb:share-button>
Ezt is tedd be:
PHP kód:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
Könyvjelzők