How to develop a Slack share button in HTML with onclick?

Thib

I want to add on my website a Slack share button that would allow users to send a link in the team or the channel of their choice.

For example, I have tags that link to web pages (of my projects) with span inside to click on the sharing "buttons" (which are actually svg) thanks to "onclick".

<a href="…">
  <img src="…"/>
    <h2>Name of the project</h2>

      <span class="facebook" onclick="window.open('http://www.facebook.com/sharer.php?u=https://www.nameoftheproject.com'); return false">
        <svg>…</svg> <!-- Facebook icon in svg -->
      </span>

      <span class="twitter" onclick="window.open('https://twitter.com/share?url=https://www.nameoftheproject.com'); return false">
        <svg>…</svg> <!-- Twitter icon in svg -->
      </span>

      <span class="linkedin" onclick="window.open('http://www.linkedin.com/shareArticle?mini=true&amp;url=https://www.nameoftheproject.com'); return false">
        <svg>…</svg> <!-- LinkedIn icon in svg -->
      </span>



      <span class="slack" onclick="window.open('…'); return false">
        <svg>…</svg> <!-- Slack icon in svg -->
      </span>

</a>

It's the same principle as Muzli if you know.

So I have difficulty understanding how to proceed with Slack. if you can help me that would be great, thank you.

Thibaut.

Erik Kalkoken

Slack teams are private and access from the "outside" has to be configured for each of them individually and specifically. So each slack team would have to grant your website / app access first to make your "public" share button work. Since this is something a normal user can't do (it requires admin or owner rights) this is not really practical to do.

If you really need to do it here is an idea how it could work:

  • You could develop a companion app for the Slack app store.
  • Each Slack team that installs this app automatically grants your website access to their Slack team and thus enables your share button.
  • Your website could have a "Add to Slack" button for installing the your companion app directly

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How to remove the Live Share button?

From Dev

HTML button onclick event

From Dev

How to remove highlight of button onclick

From Dev

How to make a button show another button onclick?

From Dev

How to Customize the Share Intent Onclick Event in Android

From Dev

How to work with Enter Button and onclick in Javascript HTML form

From Dev

How can I use the WhatsApp Share Button to share Images?

From Dev

how to create button dynamically and add the onclick event for html page

From Dev

HTML - How to change button background color on OnClick event

From Dev

How to have a static onclick parameter in HTML button?

From Dev

Html Button OnClick to move Another Activity in Android

From Dev

Dart HTML: Clear onClick listeners on Button

From Dev

Support to share button in amp-html

From Dev

How to implement "share button" in Swift

From Dev

How button onClick works

From Dev

how to develop word search, HTML5

From Dev

How to create a button with onclick with JavaScript?

From Dev

HTML Button onclick link not working

From Dev

How to Customize the Share Intent Onclick Event in Android

From Dev

button and onclick - Html, javascript

From Dev

HTML + JS: button onclick not working

From Dev

How to execute php in onclick button

From Dev

How to create Html to pdf on particular div onclick button in angularjs?

From Dev

how to remove number of share on facebook share button

From Dev

How to share the current page with the Facebook,LinkedIn and Twitter Share Button?

From Dev

how to implement copy and share button

From Dev

How to take text from TextView in xml and share using a share button?

From Dev

HTML Input Button JS onClick

From Dev

How to call function in button onclick?

Related Related

HotTag

Archive