Whatsapp sharing button for blogspot blogger without javascript - share

I am trying to add following code in blogger temlate (blogger.com). but failed
<a expr:href='"whatsapp://send?text="data:post.title - data:post.canonicalUrl"'>Share of Whatsapp</a>
I want to make like this for whatsapp sharing without using any script.
e.g.
<a href='whatsapp://send?text=Google - http://www.google.com'>Share of Whatsapp</a>

Try:
Share

With JavaScript it would be a lot easier, because the parameters need to be url encoded. You could use encodeURIComponent() to encode your strings.
If you still don't want to use JavaScript, there are plenty of free urlencoder online.
So if you want to share your problem for this page it should look like this:
Help me with my problem http://stackoverflow.com/questions/30252484/whatsapp-sharing-button-for-blogspot-blogger-without-javascript
<a href='whatsapp://send?text=Help%20me%20with%20my%20problem%20http%3A%2F%2Fstackoverflow.com%2Fquestions%2F30252484%2Fwhatsapp-sharing-button-for-blogspot-blogger-without-javascript'>Share the problem</a>

Related

How to make a website that redirects to a random link on a list?

I'm wanting to know how to make a redirect a simple way.
I know nothing about code (Sorry for my ignorance) but I want to learn.
So I want to make a website that only redirects, so when someone opens it will get redirected to another website.
The tricky thing here is that I want the website to select a random link in a list I will provide, so I thought I could do it on a free website creator (wix.com) and I wanted to know if someone could help me do the code for me.
Thank you a lot.
You will need Javascript and HTML for do this.
HTML just do static things, so you will need create a list with Javascript and then modify the link on html page.
Just add this to the Head on your HTML file:
<script>
window.location.replace('http://www.reddit.com')
</script>
That will redirect to Reddit as soon as you open your html file.
I recommend that you use the "IF / Else" or "for" function to redirect to different websites each time you open your web page, because you said that you are learning, so go slow. Just study Javascript or Dart and you can do whatever you want on your site.

Am I using the sharethis API correctly?

I have icons (custom branded facebook, twitter, pinterest etc.) on a website and I would like it to be easy for visitors to talk about blogposts on these various social media.
To do so, I have created a server-side function that outputs links that look like this:
<a target="_blank" href=http://rest.sharethis.com/share/sharer.php?destination=facebook&url=http%3A%2F%2Fsite.mydevelopmentserver.com&title=postname&pub_key=123456&access_key=123456"/>FACEBOOK LINK</a>
with equivalent links for the other social media links.
I do not load any sharethis scripts or interact with the sharethis api in any other way on my site, and this method seems to be working fine (the jury is still out on analytics)
My questions are:
a. Is there anything wrong with using sharethis in this way?
b.Is there a better way to do this that does not require me to have my access key visible in my links?
I think the answer to my questions are:
a. Yes, there is something wrong with using sharethis in this manner. Your access key will be visible to everyone.
b. Yes, there is a better way to do this. There is no need to access the API directly at all to customize your sharethis buttons. Just insert the normal sharethis script that you can generate here: http://sharethis.com/publishers/get-sharing-tools, then change the buttons' classes to st_[service]_custom (where service is the service you would like to access).
That is, put I put this in my header:
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "1234"});</script>
and this in the body:
<span class="st_pinterest_custom">Pinterest</span>
<span class="st_twitter_custom">Twitter</span>
<span class="st_facebook_custom">Facebook</span>
<span class="st_googleplus_custom">Google</span>
<span class="st_stumbleupon_custom">Stumble</span>
Then I just style the buttons using my own CSS.
Works like a charm, thanks sharethis!
Also, if anybody needs general help making things more complicated than they need to be, ask me -- I can do it for you in a jiffy!
I think the answers to my questions are:
a. Yes, there is something wrong with using sharethis in this manner. My access key will be visible to everyone.
b. Yes, there is a better way to do this. There is no need to access the API directly at all to customize your sharethis buttons. Just insert the normal sharethis script that you can generate here: http://sharethis.com/publishers/get-sharing-tools, then change the buttons' classes to st_[service]_custom (where service is the service you would like to access).
That is, put I put this in my header:
stLight.options({publisher: "1234"});
and this in the body:
Pinterest
Twitter
Facebook
Google
Stumble

Addthis change url - query parameter

I have a url something like this local.ad.company.com/Web... In this i want to remove the ad.company.com when addthis buttons are clicked. Please help.
Thanks in advance
Basically without any javascript involved you can do something like this (source)
<a href="http://www.addthis.com/bookmark.php"
class="addthis_button"
addthis:url="http://example.com"
addthis:title="An Example Title"
addthis:description="An Example Description"></a>
AddThis recommends using its Sharing API and personally I think it's the best way of implementing it.

How to add a Facebook share box to a page?

I saw many similar questions here but their answers don't work for me by some reasons.
I need the share box, not the like one.
Can anyone share a working solution?
Thank you very much
EDIT
The only working way I found is to add a link like:
Share on Facebook
But in this case there is no counter and I need it. Is there a way to do it now?
Ok, I found it here: http://www.simplebloggertutorials.com/2010/05/how-to-add-facebook-share-button-with.html
Just need to add following code:
<div>
<a name="fb_share" type="box_count" expr:share_url="data:post.url" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>
very easy solution and according to the link provided by Jarede Facebook will support Share button in the future.
Much more nicer solution here: Facebook Feed Dialog
The share button has been deprecated in preference for the Like button. Probably best to keep up with the rest of the world and use Like instead of trying to implement the outdated Share.
I found this:
https://www.hs.facebook.com/note.php?note_id=10150211527410844

JQTouch loading external html page

Do we need to have all pages inside divs in one html page?
In case of my website I would need to create a huge file to accomplish that.
Short answer is that no, you do not. In your link tags, instead of typing:
<a id="#linkTo">Link!</a>
You would type
Link!
Your content would have to be an html snippet instead of a fully baked web page. You can look at the demos to see how this is done.