fritzmg/contao-sharebuttons

Neue Buttons

Opened this issue · 15 comments

Hallo!

Ist es geplant neue Buttons aufzunehmen? z.B. Mastodon?

Do you know the sharer URL of Mastodon?

It seams that this is a bit tricky. You need a share link that belongs to the instance of the user sharing the content.

Hm, yeah, that's not really feasible then I suppose.

Anke commented

Threema?

@Anke I do not understand the question. Please provide more details.

Anke commented

I was trying to suggest adding a Threema-Share button

Do you know the share URL?

// edit: I think it should be https://threema.id/compose?text=Hello https://threema.ch/en/faq/url_actions

Anke commented

threema://compose?text=[z.B. URL]

Ohne die id wird die Threema Kontaktliste geöffnet und man kann auswählen, an wenn man schicken will.

threema://compose?text=https://de.m.wikipedia.org/wiki/Flaggen-Bestimmungsschl%C3%BCssel

schickt den Link an Threema. Kenne mich nicht genug aus, um adhoc sagen zu können, wie zb ein Seitentitel mit übergeben wird.

Kenne mich nicht genug aus, um adhoc sagen zu können, wie zb ein Seitentitel mit übergeben wird.

Just have a look at the sharebuttons_default template, e.g. for WhatsApp:

<li><a class="whatsapp" href="https://wa.me/?text=<?= $this->description ? $this->description . '%0A%0A' : '' ?><?= $this->url ?>" target="_blank" data-action="share/whatsapp/share" rel="noopener noreferrer nofollow" data-escargot-ignore title="<?= $this->lang['share_on_whatsapp'] ?>">WhatsApp</a></li>

Anke commented

Ha, great! Didn't think of that. I used to use Shariff some time ago.

Anke commented

According to Threema support https://threema.id/compose?text=Hello will lead to a Threema website with a button to open Threema on the device and offer download links for people not having Threema installed.

The link threema://compose?text=Hello will open Threema directly. However, it seems Contao doesn't accept this network protocol. Usig it in a HTML element, I get a 404. Using it in a hyperlink element, the webites base url is preceding the threema url like so: https://mywebsite.com/threema://compose?text=Hello.

Is there any way to make Contao deal with a url like threema://compose?[...]?

I am not sure what you mean. Please post your sharebuttons_default template.

Anke commented

I didn't add it to the template. I wanted to try to get the link to work the way I want it to, first. If I would add it to the template it would probably look like this:

<li><a class="threema" href="https://threema.id/compose?text=<?= $this->description ? $this->description . '%0A%0A' : '' ?><?= $this->url ?>" target="_blank" data-action="share/threema/share" rel="noopener noreferrer nofollow" data-escargot-ignore title="<?= $this->lang['share_on_threema'] ?>">Threema</a></li>
But like I say, this detouring link is not what I have in mind. I'd like to use href="threema://compose?text=[]".

The data-protecting solution Shariff by Heise is using these direct url's for Threema and Whatsapp:

shareUrl: 'threema://compose?text=' + encodeURIComponent(title) + '%20' + url + shariff.getReferrerTrack()
shareUrl: 'whatsapp://send?text=' + encodeURIComponent(title) + '%20' + url + shariff.getReferrerTrack()

I didn't add it to the template. I wanted to try to get the link to work the way I want it to, first.

If you want to use a custom protocol like this then there are more steps you need to take within Contao in order to be able to fill in something like that in a HTML element in the back end. However, this has nothing to do with this issue or this extension.

But like I say, this detouring link is not what I have in mind. I'd like to use href="threema://compose?text=[]".

Then just use that? ;)