69
70

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

特定のURLの、ツイート数・いいね数を取得するAPI

Posted at

よく使うのでメモ。

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にしました。

69
70
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
69
70

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?