Hello,
In facebook and orkut, it displays the list of friends for a particular user. How to display it? What are the real coding happening there?
Printable View
Hello,
In facebook and orkut, it displays the list of friends for a particular user. How to display it? What are the real coding happening there?
I don't know if you're asking how to display your Facebook friends via your own website, or if you're just asking how they would do that in general. I'll answer the second, because you can't query Facebook's database via your website, though you may be able to use their API.
anyhow, if you have a database with a users table, then you might also have a table for friends; this would make a link between two different IDs on the users table. Then, you would simply query your database counting how many friends this person had. there really isn't anything PHP-specific related to this. you could also get into friend requests and stuff like that, but that's another subject altogether.