Social Share Buttons - JavaScript Tutorial

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • 👉 Source code: openjavascript...
    ⚡ Looking for high-performance, afforable web hosting? We use HostWithLove: bit.ly/3V2RM9Q ❤️
    This tutorial shows you how to create social share buttons for several social media platforms (Facebook, Twitter, Linkedin, Reddit) using vanilla JavaScript to set content to be shared.
    #javascript #socialshare #webdevelopment #fontawesome #frontend #javascript_tutorial
    🔔 Subscribe for more tutorials just like this: / @openjavascript
    openjavascript...
    ⚡ NEW: Web development courses from Meta Inc. ⚡
    Front-End Developer Professional Certificate: imp.i384100.ne...
    Back-End Developer Professional Certificate: imp.i384100.ne...
    iOS Developer Professional Certificate: imp.i384100.ne...
    Meta Android Developer Professional Certificate: imp.i384100.ne...
    Meta Database Engineer Professional Certificate: imp.i384100.ne...
    Website: openjavascript...
    Twitter: / openjavascript

Комментарии • 41

  • @OpenJavaScript
    @OpenJavaScript  Год назад +2

    Thanks for watching!
    🔗 Source code: openjavascript.info/2022/12/17/social-media-share-buttons-with-vanilla-javascript/

  • @ahmadbenchakhtir5787
    @ahmadbenchakhtir5787 6 месяцев назад +1

    IMPORTANT: The web page that u got the url from should have a tag with tags to defined the thumbnail pic.

    • @Ro_V_oR
      @Ro_V_oR 4 месяца назад +1

      good point

  • @dannybribiesca
    @dannybribiesca 17 дней назад

    Thank you! You're a lifesaver!!

  • @getoverhere1225
    @getoverhere1225 Год назад +3

    This is the best tutorial I've seen so far. Thank you for keeping it simple and actually talking step-by-step through the tutorial. Can you give links in your description to find the proper resources to make sure the social Links are up-to-date.

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      Thank you for the feedback.
      And as for the links, I'm trying to keep them up to date on this blog post (includes a live example you can try out): openjavascript.info/2022/12/17/social-media-share-buttons-with-vanilla-javascript/
      Whatsapp and Telegram link are also included there.

  • @mazvydasgaigalas9359
    @mazvydasgaigalas9359 10 месяцев назад

    Smooth and easy ! Thanks

  • @dalskiBo
    @dalskiBo 8 месяцев назад

    Nice detail - thanks

  • @michaelzahgar7773
    @michaelzahgar7773 Год назад +1

    You are the Best ,, thank you so much

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      Not sure I'm the best but you're welcome and glad you liked the vid :)

  • @ShivaGurung-kl5jj
    @ShivaGurung-kl5jj 7 месяцев назад

    thank you for the helpful video

  • @ucthainguyen289
    @ucthainguyen289 Год назад +1

    Thank u so much!!

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      No problem, you're welcome! Thanks for watching!

  • @A_SaimaChowdhury
    @A_SaimaChowdhury 8 месяцев назад

    Thanks...😊

  • @yossiyun
    @yossiyun Год назад +1

    Awesome. I am trying to implement this in a React project. Does Linkedin not support the title parameter?

    • @OpenJavaScript
      @OpenJavaScript  Год назад +1

      When researching for this video, I looked but it does not seem the LinkedIn API supports a title parameter.
      Good luck!

    • @yossiyun
      @yossiyun Год назад

      @@OpenJavaScript Alright.. Thanks

    • @Ro_V_oR
      @Ro_V_oR 4 месяца назад +1

      @@yossiyun LinkedIn supports a title parameter in 2024

    • @yossiyun
      @yossiyun 4 месяца назад

      @@Ro_V_oR Thanks

  • @mohamed404eg
    @mohamed404eg Год назад

    thanks

  • @seca021
    @seca021 Год назад +1

    Great video! Thanks. What are the href's for WhatsApp or Viber?

    • @OpenJavaScript
      @OpenJavaScript  Год назад +1

      Not sure about Viber but I posted the WhatsApp one on the related blog post for this video:
      openjavascript.info/2022/12/17/social-media-share-buttons-with-vanilla-javascript/

  • @Dinesh29293
    @Dinesh29293 8 месяцев назад

    I am not able to find the accepting query string for whatsapp! Can anybody help me out??

  • @Nasir127sb
    @Nasir127sb 2 года назад

    best explain

  • @alexandremorey8993
    @alexandremorey8993 Год назад +1

    Hi There, do you know how I can share the score for a game like wordle? (the black, green, and yellow squares)

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      First, you'd need the score you want to share somehow (I'm assuming you have a game running the browser yourself).
      Then, you 'dprobably would want to share the score as an image to various social media platforms. You could do this using the HTML5 Canvas API to create a new image featuring the score and then sending the image as part of a query string to the platform you want to share one.

    • @alexandremorey8993
      @alexandremorey8993 Год назад

      @@OpenJavaScript THank you very much, this helps a lot :)

  • @damircicic
    @damircicic 4 месяца назад

    This does not seem to work anymore. The link that is shared is always the homepage link. Does anyone else has the same problem, and does anyone have a solution?

    • @Ro_V_oR
      @Ro_V_oR 4 месяца назад +2

      I advice grabbing the base share link from a social share link generator as alot tend to have the most recent links. The one he used would have gotten outdated as updates continue to roll

  • @shobhitkumar_shorts
    @shobhitkumar_shorts Год назад +1

    From where I can get all platforms url?

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      I don't know if there is one. But I am trying to keep the major ones up to date on this page:
      openjavascript.info/2022/12/17/social-media-share-buttons-with-vanilla-javascript/
      Let me know if there are any missing that you think I should add.

    • @Ro_V_oR
      @Ro_V_oR 4 месяца назад

      I advice making use of the links from social share generators. These are usually up-to-date since his blog was last updated in 2022

  • @user-uw7wn3wc8c
    @user-uw7wn3wc8c 9 месяцев назад

    how to do in multiple share in multiple article same page?

    • @Ro_V_oR
      @Ro_V_oR 4 месяца назад

      You will have to develop that solution by yourself.
      I can't honestly understand your comment but if you mean multiple links in the same page then you can make multiple buttons for diff shares

  • @Voterite
    @Voterite Год назад +1

    How to create whatsapp share button ? Thanks

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      That's an interesting question!
      I'll try to do a tutorial on it soon as others may find it interesting.
      For now, this should help you out, using the same method as in the video:
      api.whatsapp.com/send?phone=44XXXXXXXXXX&text=url
      Don't forget that the value for text should be a url-encoded string!

  • @unLinuxeroMas
    @unLinuxeroMas Год назад +1

    how i can do others bottuns for telegram whatsapp y messenger

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      All here: openjavascript.info/2022/12/17/social-media-share-buttons-with-vanilla-javascript/
      I'm trying to keep this page up to date for the future (as updating the video is not so easy!)
      BTW: For messenger, that's an option that you would select after choosing to share on FB.

    • @unLinuxeroMas
      @unLinuxeroMas Год назад +1

      @@OpenJavaScript thanks so much ñaño

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      @@unLinuxeroMas You're welcome :)