ramesh
ramesh

Reputation: 4082

Simple Facebook connection with my web site

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

Upvotes: 0

Views: 167

Answers (1)

qitch
qitch

Reputation: 829

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.

Upvotes: 1

Related Questions