facebook facepile tip
I need fast&easy tip.
I'm tempted to 'socialize my website' a little,so I gave a look to facebook facepile so开发者_StackOverflowcial plugin definition:
"[..] If the user does not have friends who have liked your page or have connected to your site, no faces will be shown.[..]"
I was wondering if "connected" meant just "browsing my website"?
Thanks
Luca
No connected means that they accepted to share their facebook data with you through your application by clicking on the "allow" button on the window promted by the FB-app
For facebook application you can do this.
<script>
function fbLoginStatus(response) {
if (response.status != 'unknown') {
$('.facebook_facepile').show(); // show your facepile iframe
}
}
window.fbAsyncInit = function() {
FB.init({appId: 'YOUR_APP_ID', status: true, cookie: true, xfbml: true});
FB.getLoginStatus(fbLoginStatus);
FB.Event.subscribe('auth.statusChange', fbLoginStatus);
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
精彩评论