Just would like to know if it is illegal to create an application or website where people can check who has viewed there profile If so what are the concequences?
Its against Facebooks TOS to create an application that can track profiles, as well as sites. I've seen applications that provide the functionality if both people agree to add the application, I don't know about those. I think the worst that would happen is they would send a cease or desist (i've known this to happen to somebody) but its very likely they will just block your code from working.