Skip to content

hectorpalmatellez/imbtn

Repository files navigation

#Instant Messaging Buttons

The main idea is to create simple buttons to share an article from a blog, or any webpage using Line or Whatsapp.

For now, buttons can:

  • Detect current URL, and add it to the content to be shared.
  • Detect page <title> before URL in the message.

##References

Line has its own button to share links, the LINE it! Button. It needs an external Javascript file and also gives you the images to use for the same function.

As for Whatsapp, there's a tool that generates this button called Whatsapp Sharing Button Generator. Almost the same thing as Line's.

As the Whatsapp button generator says:

iPhone users are clicking their new WhatsApp button more than Twitter's. This was enough for us to build a WhatsApp sharing button generator, so you can easily create your own. — According to Buzzfeed.

Since I'm more of a Line fan, I started there.

##Structure

Both applications use different structure in the process of sharing a link there. They use something called URL Scheme.

Line's structure is:

line://msg/text/Web Title http://link.to/be/shared

While Whatsapp's structure is:

whatsapp://send?text=Web Title http://link.to/be/shared

So what I have does is make this work while there's a link with a class="line-btn" or class="whatsapp-btn". Both buttons are ugly, I know, because I just wanted the logic to work. In any case, here are official sources to get their logos:

###Comments

  • Of course, these links must be tried from a phone with these apps already installed. I tried on an iPhone with iOS8 (in case it doesnt't work in other OS).
  • In case you want to try them, here's the link: CLICK ME!

About

📱 Instant messaging app buttons to share content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published