I've noticed that Huffington Post does this: if you log out of there, it forces you to log out of Facebook as well, and if you log in on Facebook and go back to Huffington Post, it automatically logs you in there as well.开发者_StackOverflow社区 Is this a straightforward use of the FB Connect API that I just haven't noticed, or is there some trick?
I think you are looking for something along the lines of fb:login-button, which is part of Facebook-connect. When users login with this feature, it links their facebook account with your website.
Using the connect wizard, you can customize what your button does, and the documentation explains how to manually add extra features to the button.
Here is an example on how to use it:
<fb:login-button v="2"><fb:intl>Connect with Facebook</fb:intl></fb:login-button>
Good luck.
精彩评论