Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share functionality based on existing export #68

Open
holzenburg opened this issue Jan 15, 2014 · 12 comments
Open

Share functionality based on existing export #68

holzenburg opened this issue Jan 15, 2014 · 12 comments

Comments

@holzenburg
Copy link

In a recent email conversation with Julien, we discussed possibilities to implement a share functionality. Background: I launched the feedshare.net service some days ago. Julien contacted me and I implemented the SubToMe button. The next idea that came up was to have a direct import flow on feedshare.net – or even an „Share with ...“ function on SubToMe.

There is the export via http://subtome.com/#/export. The subscription data is stored in localStorage, but only accessible by subtome.com.

To summarize Juliens attempt:

  • Create another page like /#/export, maybe /#/share
  • Other application (like feedshare.net) calls that with a callback url.
  • User gets redirected back with the subscription data as a JSON list.

In general, I think that's a great way to do it. I would add something, though:

  • That share-page should return to the callback via POST to avoid URL length issues.
  • It could/should accept a parameter to specify the return method (JSON or OPML)
@julien51
Copy link
Member

I'm not sure we could redirect via POST since this is done from the browser as SubToMe is a browser only app and does not have a server. However, another solution would be to create a JSONP url accessible via a secret token with a short term expiration.

I'll try to think of other ways but that may be a bit tricky! I'll also start implementing when I get a minute! (this weekend hopefuly!)

@holzenburg
Copy link
Author

Shouldn't it all be possible with pure Javascript?

  1. Create a form element, injecting it into the HTML (or use a prepared one)
  2. Inject a hidden textarea with the localStorage contents (maybe base64-encoded)
  3. Set target-attribute of the form based on callback parameter
  4. Let the user click a submit button

Or am I missing some impossibilities here?

@holzenburg
Copy link
Author

One other possibility that just came to my mind would be to run the complete SubToMe application (a duplicate) on the feedshare.net server. But really, I don't like that idea very much ...

@julien51
Copy link
Member

Of course that would run, but that means that every other reader would have
to register with feedshare.com on top of subtome.com.
Now, I've been trying to think about a syncing mechanism accross different
subtome apps running on different domains for months. It's really tricky
and I think it would eventually rely on /#/share anyway...

@holzenburg
Copy link
Author

Yeah, as I wrote, I do not like the idea ;)
But what's with the Javascript technique I outlined above?

@julien51
Copy link
Member

Ha! Missed it and only saw the last one... the technique should work, indeed. I'll try that too!

@julien51
Copy link
Member

Hey! I finally started working on it. I have a prototype now and it works both ways, but I use the url only.
Even the "create" form technique should work, it can only send data to a server and I'd feel much better if the whole process can work only on client side. (Ideally /#/share should work both ways!).

It looks the allowed size of the query string is much larger than what I initially thought.

@julien51
Copy link
Member

Ok, the code is live now. You should be able to go to https://subtome.com/#/share?url=<url> where you replace <url> with the handler on your end. You need to include {subscription} somewhere in that handler to get the OPML list passed as an base64 encoded string.

For example, something like:
https://www.subtome.com/#/share?url=http:%2F%2Fsubtome.com%2F%23%2Fimport%3Fopml%3D{subscriptions} should work :)

@holzenburg
Copy link
Author

Awesome! I will try that soon. Not today though :(

I’ll keep you udpated.

Am 23.01.2014 um 11:23 schrieb Julien Genestoux notifications@github.com:

Ok, the code is live now. You should be able to go to https://subtome.com/#/share?url= where you replace with the handler on your end. You need to include {subscription} somewhere in that handler to get the OPML list passed as an base64 encoded string.

For example, something like:
https://www.subtome.com/#/share?url=http:%2F%2Fsubtome.com%2F%23%2Fimport%3Fopml%3D{subscriptions} should work :)


Reply to this email directly or view it on GitHub.

@julien51
Copy link
Member

julien51 commented Aug 5, 2014

Any news on this?

@holzenburg
Copy link
Author

Unfortunately not. We are busy renovating our house and earning money. I hope to find time for this in a few weeks.

Am 05.08.2014 um 12:19 schrieb Julien Genestoux notifications@github.com:

Any news on this?


Reply to this email directly or view it on GitHub.

@julien51
Copy link
Member

julien51 commented Aug 5, 2014

These are good excuses :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants