Simple Facebook connection with my web site

169 Views Asked by At

In one of my web page I need to show the username , well this is a public chat page. My requirement is if that user is logined in facebook then need to show his name and profile pic other wise prompt for entering new username ?

Any facebook plugin available for this ?

Please help Thanks

1

There are 1 best solutions below

0
qitch On BEST ANSWER

http://developers.facebook.com/docs/guides/web/#personalization

Part of the example they show:

FB.api('/me', function(user) {
        if (user) {
          var image = document.getElementById('image');
          image.src = 'http://graph.facebook.com/' + user.id + '/picture';
          var name = document.getElementById('name');
          name.innerHTML = user.name
        }
      });

I believe the only way you can get this info is by having Facebook login.