OBSOLETE this repo has not been maintained in a while. Please try https://github.com/shred/shariff-backend-java as an alternative
A java backend for https://github.com/heiseonline/shariff
To use your own server, simply build the app (mvn package
) and deploy the resulting war to your favourite application server.
mvn tomcat7:run
Should result in 'Running war on http://localhost:8080'
Open http://localhost:8080/?url=www.example.com to receive
{"reddit":25,"facebook":474517,"twitter":10237,"linkedin":0,"delicious":0,"stumbleupon":5882,"pinterest":1,"google-plus":28387}
see Config Class
Configure the proxy via environment variables:
# here you should provide a way to contact you. this information will be sent with the
# user-agent header
SHARECOUNT_PROXY_MAINTAINER=my.domain.com
# restrict for which domains one can request the sharecounts for
# a semicolon delimited list of domains, regular expressions are possible
SHARECOUNT_PROXY_DOMAINLIST=.*
# sharecount uses cache2k, these are the things you can configure
SHARECOUNT_CACHE_SIZE=1000
SHARECOUNT_CACHE_EXPIRY_MS=300000
- restrict length of parameter
suggestions and feedback welcome