Recognising registered user (from another site)

For everything that's not in any way related to PureBasic. General chat etc...
Seymour Clufley
Addict
Addict
Posts: 1267
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Recognising registered user (from another site)

Post by Seymour Clufley »

Yo all,

Having returned from holiday I'm curious about something Facebook have started doing, and would like to implement a similar service on my own website. It's an HTML/server question and, though I've asked it on a more suitable forum, I think somebody here may know the answer.

If you're a registered user of Facebook, you can comment on something on another website using your FB identity. Your FB identity seems to be automatically recognised; the FB commenting stuff appears without you doing anything. If you post a comment, it gets added to that site AND to your Facebook wall.

I don't understand how they do this. How do they know it's you looking at this other website? Is it done by your IP address or the new client-side storage thing?

I ask because I'd like to do something similar for my own site - ie allowing registered users of my site to comment on things on other websites.

Thanks for reading,
Seymour.
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Recognising registered user (from another site)

Post by IdeasVacuum »

How do they know it's you looking at this other website?
If you are using the PC that you used to register with FB, then may be they saved a cookie on your system for this purpose?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
naw
Enthusiast
Enthusiast
Posts: 573
Joined: Fri Apr 25, 2003 4:57 pm

Re: Recognising registered user (from another site)

Post by naw »

I'm guessing that (as IdeasVacuum said) it is a cookie entry in your browsers cookie file that identifies you, but since cookies are supposed to be readable only from the domain that created it, I guess the form that allows you to create the post actually executes from the FB site and is embedded in your website's pages.
Ta - N
User avatar
TomS
Enthusiast
Enthusiast
Posts: 342
Joined: Sun Mar 18, 2007 2:26 pm
Location: Munich, Germany

Re: Recognising registered user (from another site)

Post by TomS »

All Facebook boxes on other sites are in fact embedded via iframe.
Seymour Clufley
Addict
Addict
Posts: 1267
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Re: Recognising registered user (from another site)

Post by Seymour Clufley »

Ah! An iFrame... of course!
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Post Reply