One of the cool features of Facebook Connect is friend linking. Basically, as the owner of a site you are able to inform your FB connected site users of their other FB friends that are also using the site. This will allow them to quickly find friends in your site.
Programmatically, how this is achieved is as follows
Note: "You" here refers to you the external site owner
- When a user registers on your site normally ,i.e. they provide their email address, and you register a hash of this email address using connect.registerUsers. However, this email address must also be the one that they use on facebook, otherwise facebook will not be to recognise the user.
- The alternative method is when a user uses your site without registering but instead uses it via Facebook Connect. In this situation, their email will be unknown to you.
- If the user then uses "Facebook Connect" to connect with Facebook, you now have their Facebook ID.
- With a Facebook ID, you will be able to
- obtain the number of their friends using the site but have yet to link up (i.e. you do not have their Facebook ID but have their email address) using connect.getUnconnectedFriendsCount. You can then prompt the user to invite their unconnected friends to connect with your site using connect.InviteConnectUsers.
- obtain a list of of their friends using your site via friends.getAppUsers. For this to work, these friends must also have connected with your site. These friends are what is defined as "connected friends". You can then suggest these friends to the user to connect with locally on your site.
And that should be it on the friend linking bit of Facebook Connect.