Addthis change url - query parameter - addthis

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.

Related

Whatsapp sharing button for blogspot blogger without javascript

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>

How to click a link which is created javascript with Goutte

Does anyone know how can I click a link which is set by javascript with Goutte ?
For example the link is like this.
<a onclick="document.getElementById('Detail').click()" href="#a" id="Link01" name="Link01">get detail</a>
You know Goutte cannot explain javascript. Selenium or casperjs is a better choice.

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

How do I add a referral variable to an AddThis URL without resetting the count?

for my project I need to be able to add a referral variable (something like ?ref=xxxx) to URLs shared via AddThis.
However, by adding the variable and changing the URL, the "count" displayed on the tool resets .
So does anyone out there have a solution to use AddThis to share URLs with variables on them, without resetting the "count" displayed to the user?
Thank you all so much for your time!
I had a similar problem.
So, you can use fb_ref parameter: https://developers.facebook.com/docs/reference/plugins/like/
In the AddThis you need to use the following format: fb:like:fb_ref
AddThis Support ticket: http://support.addthis.com/customer/portal/questions/1127049-facebook-data-ref
You can do this via the ref attribute on the Like button. See the ref attribute here: https://developers.facebook.com/docs/reference/plugins/like/
However, I'm currently looking for how to implement this via AddThis. I'll post here if/when I find a solution.

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