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>
Related
I have a WordPress site, let's say there is a post that has a url: https://highthand.com/176-2/, its slug is 176-2, and I need that when I click the download button, I go to the site https:// getsafe.cloud, but so that this slug is displayed in the url, that is, the url looks like this https://getsafe.cloud/176-2. I can just go to https://getsafe.cloud/176-2, well then I will get an error that the page was not found, and I need the contents of https://getsafe.cloud to be displayed. How can this be implemented. Thanks in advance.
You can achieve this by changing the 404 page that came by default in the worpdress Themes. Also you can change url direction of 404 to home directly. Hope yo like the answer.
Thanks
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!
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 need to share a link on Facebook, the link is like below:
http://mydomain.com/mypath#photos:para=a¶2=b
but without luck, the result is:
http://mydomain.com/mypath
which is not what I want, I try below link:
Using hash tags with Facebook share possible?
to replace the # with %23 but then it gives me:http://127.0.0.1/mypath?photos%3Apara=a which is obvious wrong.
Any idea about this? Thanks in advance.
BTW the facebook sharer link is:
https://www.facebook.com/sharer/sharer.php?u={0}
Facebook wont crawl the Javascript.
But as Facebook take the og tag into the account.
So you need to create pages alike your hash pages with different URL.
May be http://mydomain.com/mypath?para=a¶2=b
for : http://mydomain.com/mypath#photos:para=a¶2=b
And place only og metas in there, and redirect the page with Javascript. You may also put same data as in the hash page.
So Facebook will read the og tags. And if the link is clicked on Facebook than it will redirect after page load.
Thanks
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: