Facebook

Programming, for all ages and all languages.
Post Reply
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Facebook

Post by qw »

Today I studied the source of my Facebook page. Talking about obscurity! Impossible for a mere mortal to comprehend.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Facebook

Post by Combuster »

They have a habit of preventing people to emulate "like" clicks...
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
phillid
Member
Member
Posts: 58
Joined: Mon Jan 31, 2011 6:07 pm

Re: Facebook

Post by phillid »

Ah, Facebook.
I was writing some software that would log into 0.facebook.com (because it's lightweight and really easy to parse) as myself and act as a proxy, fetching any URL someone messaged me and replying to them with the page content (so they could sort-of get free internet on their phone through 0.facebook.com). All of a sudden, I'm getting a redirect to an HTTPS page when I try and use HTTP... oh the pricks at Facebook ;) I cannot be bothered writing my software to use an SSL connection, it's not worth it any more.
Hobbes wrote:Today I studied the source of my Facebook page. Talking about obscurity! Impossible for a mere mortal to comprehend.
I too have gone through the code, you're right; it's a complete nightmare. It makes you wonder how readable their code is before the page is prepared to be sent to you... :P
phillid - Newbie-ish operating system developer with a toy OS on the main burner
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: Facebook

Post by qw »

They probably have some automatic obfuscator. I mean, their developers do not have to work with this, do they?
AbstractYouShudNow
Member
Member
Posts: 92
Joined: Tue Aug 14, 2012 8:51 am

Re: Facebook

Post by AbstractYouShudNow »

I think that they just have pretty looking code that they make ugly through PHP. In fact, I think that they only write blocks of pages, which are assembled by PHP pages, with eventually an obfuscator processing the output.
If you really want to interact with Facebook, I think that the best way to do so is to use the official Facebook API's
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: Facebook

Post by qw »

I must admit that what is displayed in my browser is far from obfuscated. Very neat and accessible. I like it.
phillid
Member
Member
Posts: 58
Joined: Mon Jan 31, 2011 6:07 pm

Re: Facebook

Post by phillid »

I use Firefox, and I must say, addons such as Firebug (I'm sure there are similar ones for other browsers) make wading through a website's code so much easier... I'm looking Facebook's code right now with no real difficulty.
I've noticed that they have a block of code where each line of Javascript is in a separate set of <script></script> tags... Bandwidth wasting to the max? :P
phillid - Newbie-ish operating system developer with a toy OS on the main burner
Post Reply