I looked through the API documentation but couldn't find it. It would be nice to grab that number to see how popular a url is. Engadget uses the twitter share button on articles if you're looking for an example. I'm attempting to do this through javascript. Any help is appreciated.
相关问题
- Rails how to handle error and exceptions in model
- CORS issue with Twitter api calls in Webpack dev s
- Twitter sign in crashes with TWTRInvalidInitializa
- Accessing Twitter through Javascript
- Swift 3: How to reverse a transparent Navigation B
相关文章
- is there a callback option with twitter's “fol
- Twitter name length in DB
- Twitter oauth refresh token
- Login with Twitter on iOS
- linqtotwitter - grab the saved credentials
- Getting the location using Tweepy
- Making any tweet favourite through iOS 5 twitter A
- LinqToTwitter - IsAuthorized always returns false
This way you can get it with jquery. The div id="twitterCount" will be populated automatic when the page is loaded.
Cheers!
this is for url with https (for Brodie) https://cdn.api.twitter.com/1/urls/count.json?url=YOUR_URL
This comment https://stackoverflow.com/a/8641185/1118419 proposes to use Topsy API. I am not sure that API is correct:
Twitter response for www.e-conomic.dk:
http://urls.api.twitter.com/1/urls/count.json?url=http://www.e-conomic.dk
shows 10 count
Topsy response fro www.e-conomic.dk:
http://otter.topsy.com/stats.json?url=http://www.e-conomic.dk
18 count
This Javascript class will let you fetch share information from Facebook, Twitter and LinkedIn.
Example of usage
Download
https://404it.no/js/blog/SocialMediaStats.js
More examples and documentation
Javascript Class For Getting URL Shares On Facebook, Twitter And LinkedIn
This is not possible anymore as from today, you can read more here:
https://twitter.com/twitterdev/status/667836799897591808
And no plans to implement it back, unfortunately.
Up vote so users do not lose time trying out.
Update: It is however possible via http://opensharecount.com, they provide a drop-in replacement for the old private JSON URL based on searches made via the API (so you don't need to do all that work).
It's based on the REST API Search endpoints. Its still new system, so we should see how it goes. In the future we can expect more of similar systems, because there is huge demand.
Yes,
Replace "http://www.web-technology-experts-notes.in" with "your full web page URL".
Check the Sharing count of Facebook, Twitter, LinkedIn and Pinterest
http://www.web-technology-experts-notes.in/2015/04/share-count-and-share-url-of-facebook-twitter-linkedin-and-pininterest.html
Update: As of 21st November 2015, Twitter has removed the "Tweet count endpoint" API.
Read More: https://twitter.com/twitterdev/status/667836799897591808