jhass / insporation

Flutter based client for diaspora*
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

Proposal: Add a social media sharing button to every post #26

Closed Ravenbird closed 4 years ago

Ravenbird commented 4 years ago

With Diaspora's web interface it is easy to copy the address of a post to share it. Unfortunately, this is not possible with Inspiration. Therefore it would be good to have a button to pass it on to other media and to copy the address.

jhass commented 4 years ago

So the "right way" to do this would be for the API to return something like a share_url property for the post, which it currently doesn't. So right now the client could only do this by making assumptions about what the URL should be.

Ravenbird commented 4 years ago

Yeah you are right. If not, the question is whether the API works with the normal Post-IDs on the respective post. If this is the case, you can use it to create a suitable URL. For example, if you have the Post-ID 8869742 for an account on nerdpol.ch, this is what you get:

https://nerdpol.ch/posts/8869742

But if the API works with something completely different it becomes really difficult.

I think that such a button could also lead to people sharing more public Diaspora contributions and thus make Diaspora better known.

jhass commented 4 years ago

It works with the post guids, so we could quite easily construct https://<currently signed in users hostname>/posts/<guid>, which diaspora currently accepts too on that route. It's just a ton of assumptions in that still :)

Ravenbird commented 4 years ago

Two guys, one idea. :-)

tclaus commented 4 years ago

It then could simply be the platform-specific 'share' button. No frills.

jhass commented 4 years ago

I mean we also have the diaspora://<diasporaId>/posts/<guid> (or so, don't quite remember the exact format) custom deeplink, I just doubt a lot of users have that registered :P

jhass commented 4 years ago

I'm fine with guessing for now, but nonetheless opened https://github.com/diaspora/api-documentation/issues/58 for handling this properly at some point.

tclaus commented 4 years ago

I have prepared something. PR soon.