よく使うのでメモ。
URLのツイート数
http://fnobi.com のツイート数を取得
http://urls.api.twitter.com/1/urls/count.json?url=http://fnobi.com/
返り値
{"count":1,"url":"https:\/\/siteproxy.ruqli.workers.dev:443\/http\/fnobi.com\/"}
count 1ですかfnobi.com…。
URLのいいね数
http://google.com/ のいいね数を取得
http://graph.facebook.com/http://google.com/
返り値
{
"id": "http://google.com/",
"shares": 7582903,
"comments": 133525
}
※fnobi.comはいいね数ゼロでつらかったので、google.comにしました。