Julienh / Sharrre

Make your sharing widget! Sharrre is a jQuery plugin that allows you to create nice widgets sharing for Facebook, Twitter, Google Plus (with PHP script) and more.
sharrre.com
MIT License
1.04k stars 413 forks source link

Replaced old twitter count api call with opensharecount api #260

Closed sphism closed 8 years ago

sphism commented 8 years ago

Related issue: https://github.com/Julienh/Sharrre/issues/258

See http://opensharecount.com/ for details

To get this working you need to sign up with http://opensharecount.com/ and authorize them to your twitter account so they can make REST api calls.

chalavacs commented 8 years ago

+1. This worked for me too.

jalbersmead commented 8 years ago

OpenShareCount contacted me and the &callback=? causes their system to not be able to cache the request and caused their server load to go up. They asked me to remove the callback param.

Hi,

Thanks again for using OpenShareCount to show twitter share counts on your site.

We've noticed your site is sending us lots of requests for our API that we can't cache, and this is putting a high load on our server.

In the file for the Sharrre plugin you are using

could you change http://opensharecount.com/count.json?url={url}&callback=? to http://opensharecount.com/count.json?url={url} please?

Getting rid of th 'callback=?' part will make your request cacheable on our end. This will help decrease the load on our servers and get results back to your visitors faster. Win-win!

sphism commented 8 years ago

Ah that's interesting. I wondered that when I did it. I followed their instructions precisely. They might want to reword the instructions.

It took a while for us to see any results but we do now get a few tweet counts. But the difference in numbers from the old api is substantial. Eg used to be hundreds, now less than ten. Also we've noticed that a huge number of our urls return 0 shares.

This is not an issue with opensharcount. The Twitter search api is just a terrible replacement for the old count api.

On 1 Dec 2015, at 10:28, John Albers-Mead notifications@github.com wrote:

OpenShareCount contacted me and the &callback=? causes their system to not be able to cache the request and caused their server load to go up. They asked me to remove the callback param.

Hi,

Thanks again for using OpenShareCount to show twitter share counts on your site.

We've noticed your site is sending us lots of requests for our API that we can't cache, and this is putting a high load on our server.

In the file for the Sharrre plugin you are using

could you change http://opensharecount.com/count.json?url={url}&callback=? to http://opensharecount.com/count.json?url={url} please?

Getting rid of th 'callback=?' part will make your request cacheable on our end. This will help decrease the load on our servers and get results back to your visitors faster. Win-win!

— Reply to this email directly or view it on GitHub.

brugeman commented 8 years ago

Hi, guys. I wanted to offer you another alternative for Twitter share counts: newsharecounts.com. It might be more suitable for those who own many websites.