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!
Related
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>
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
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.
I'm adding social media button to a website to follow / like a specific page and looking through Google's documentation on adding a follow button to your website, all I can see is their pre-made buttons:
https://developers.google.com/+/web/follow/
What I want to do is have a little image of their logo and when this image is clicked, open up a box in a popup or new window to follow a Google+ page. Is there any URL I can put as a href around the image or some JavaScript to use instead of having to use the button that Google's JavaScript generates as it is a total pain to style.
Many thanks.
See The Demo Here
<a href="https://plusone.google.com/" onclick="popUp=window.open('https://plus.google.com/share?url=YOUR WEBSITE URL', 'popupwindow', 'scrollbars=yes,width=800,height=400');popUp.focus();return false">
<img src="http://placehold.it/50x50/" alt="Google+" title="Google+"/>
</a>
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: