Hacker News new | ask | show | jobs
by nstart 3976 days ago
This would be the ideal workflow because it's non platform dependent (works on desktop and mobile browsers with no additional steps). The question is, how does the browser tell personb.com that the reshare point for the current visitor (person A) is persona.com.

Struggled with this since there doesn't seem to be a way for the browser to set a value that's writable by one site but readable by any site

1 comments

I don't think you can make something like this fully distributed with current web technologies, but one solution would be to use a centralised domain for identification.

When Person A signs up / logs in their instance includes an iframe at personident.com which sets a cookie saying their instance is persona.com.

When they visit Person B's site the include an iframe for the share endpoint at personident.com. That knows about persona.com, so displays a button to share to their instance.

Iframes may sound nasty but this is how all the social sharing buttons work at the moment. I think the code on personident.com could just be JavaScript, so hosting would be easy.