Use google plusone button (not share button) in a newsletter - javascript

Good morning folks.
I try to implement the Google "+1" button into a newsletter (they are also as static web version available) but I can't use javascript here.
Is there any way to do this without javascript? It's also possible to share a page via a static url from google:
https://plus.google.com/share?url=your-page-url
Thanks in advance

I think you answered your own question by adding that link.
You'll have to create a "+1" image and embed it in your newsletter (remember to host the image on your servers and link it from there). Example:
<a href="https://plus.google.com/share?url=your-page-url">
<img src="http://www.yoursite.com/images/plusone.jpg" />
</a>
where your-page-url is your page url (http://www.yourpace.com)

No. The JavaScript button is the only supported method of +1'ing a URL. You can add a feature request.

Related

Short URL for whatsapp share

I want to share an article to WhatsApp. Its URL will be like this
www.mynewsportal.com/news/myarticle
When I share this,the above URL must change to the following format
mnp.com/myarticle
Also, if I click this link it must redirect to the original URL. Is that possible? Any help is appreciated.
Thanks in advance!!!
Well the short link is already in use so no, a redirect will not be possible in this case.
But you can specify the url you want to redirect the user to, in the data-href
<a href="whatsapp://send" data-text="Take a look at this awesome article:"
data-href="mnp.com/myarticle" class="wa_btn wa_btn_m" style="display:none">My
news portal - article</a>

whatsapp sharing button- share url is incorrect

I am adding share button in my website, and my share URL has some parameters. However, on phone extra parameters in the URL are ignored.
my button :
<a class='whatsapp-icon' href='whatsapp://send?text=https://www.exmaple.com/#/lat=10.11,long=20.11'></a>
When I open this link in webpage link it open fine with all parameters, but on the phone link comes as just www.exmaple.com and parameter '#/lat=10.11,long=20.11' is ignored in share window.
This is angular 1.xx webpage where share button is present.
LATEST WAY TO DO THIS
<a *ngIf="isWhatsAppIconVisible" href="https://api.whatsapp.com/send?text=check out this link : {{shareableUrl}}" data-action="share/whatsapp/share">
<img src="assets/whatsapp.png" alt="whatsapp" />
</a>
You need to sanitize anchor href. Here you can find a solution for your problem:
Whatsapp Sharing in AngularJS
Keep rocking!

I've linked an Awesome Fonts logo to another website in HTML but it wants to look in my website directory and not link directly to the URL?

So at the bottom of my website I have a social media section that links to each of my social media accounts. I have gotten three of them to work using the Awesome Fonts CDN. But my fourth one refuses to cooperate and I don't know why.
<i class="fa fa-github"></i>
This bit of HTML will link the github icon to my github account perfectly fine. But when I want the linked in logo to work using the following code-
<i class="fa fa-linkedin"></i>
I get
Not Found
The requested URL /“INSETURLHERE†was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to...
Oddly enough when I mouse over the logo (which does show up) it tells me it is trying to direct me to www.mywebsite.com/www.linkedin.com/mypage
Why would the last link using the exact same syntax want to search my website for that page, when the other links work just fine? Any help would be much appreciated!
A link tag's href attribute needs to be prefixed by // or http:// in order to tell a browser to look outside of your domain.
The primary issue was that the href was using "smart" quotes instead of standard quotes.
you have to provide "https://" or "http://" as a prefix

Image Download Button for Wordpress

How can I add custom image download button for Wordpress?
I mean when we click on download button, instantly image downloading starting without any pop up or warning.
Please help me with all required codes.
Thanks...
from the formatting of your question, I'll assume that you're not too technical. To do this properly you'll need to do some work on the server, to send the file requested by the client with the correct headers.
There is a simple dom method to do it though, have a look at
http://caniuse.com/#feat=download
Though its not widely supported, it may be a viable and simple solution.
<a href="/path/to/image" download>
<img src="/path/to/image" />
</a>
There is also a handy plugin for WordPress that will help with downloads, there may be others, but have a look at
https://wordpress.org/plugins/wp-downloadmanager/
There is also many discussion on SO here regarding this, so in the interest of brevity have a look at these if you'd like a more robust and complete solution
Example given with PHP
href image link download on click
Expamle given with server config and JS
Force Download an Image Using Javascript
Do you want like this link updated
<a href="#" download="image.jpg" title="ImageName">
<img src="http://www.teluguone.com/photos/images/download_new.png" alt="ImageName">
</a>

Facebook share button

I want to add Facebook share button to my site. But when I use the code given by Facebook, it doesn't show any FB logo image in button style & also doesn't count any share. Please help me figure out a better code.
Currently, I'm using:
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fparse.com" target="_blank">
Share on Facebook
</a>
The easiest way to add Facebook share button would be to visit http://www.facebook.com/share_partners.php and copy the code and paste it in your webpage after replacing the text "url" with the actual URL of the page you want to share. If it is dynamic content, you can use the variable or object name.
<script>
function fbs_click(){
u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
</script>
<img src= "http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif?8:26981" alt="" />
Take a look at the official documentation: Facebook For Developers: Share Button.
If you merely click the "Get Code" option on the Facebook Share Button Configurator & Generator, you'll see that the URL generated is rather simple:
https://www.facebook.com/sharer/sharer.php?u={yourURLhere}
At least it seems that way to me:

Categories

Resources