LoginSignup
11

More than 5 years have passed since last update.

instagramの特定のユーザーのフォロワー数を取得する(だけ)

Posted at

0.アプリ作成

アクセストークンの取得などは以下で。
http://qiita.com/zurg/items/4c423b93b6a7f1ac737d

1.ユーザーIDを取得

https://api.instagram.com/v1/users/search?q=USERNAME&access_token=ACCESS-TOKEN
例:
https://api.instagram.com/v1/users/search?q=okamuradesu&access_token=4342120.85bf38d.874fab866d314be9a74bdda41d318bb0
※アクセストークンはダミー
{
meta: {
    code: 200
},
data: [{
    username: "okamuradesu",
    bio: "",
    website: "",
    profile_picture: "http://photos-a.ak.instagram.com/hphotos-ak-xpf1/10362107_259935804209424_970933642_a.jpg",
    full_name: "okamuradesu",
    id: "1386028045"
}]
}

 

2.ユーザー情報を取得

https://api.instagram.com/v1/users/USERID/?access_token=ACCESS-TOKEN
例:
https://api.instagram.com/v1/users/1386028045/?access_token=4342120.85bf38d.874fab866d314be9a74bdda41d318bb0
※アクセストークンはダミー
{
meta: {
    code: 200
},
data: {
    username: "okamuradesu",
    bio: "",
    website: "",
    profile_picture: "http://photos-a.ak.instagram.com/hphotos-ak-xpf1/10362107_259935804209424_970933642_a.jpg",
    full_name: "okamuradesu",
    counts: {
        media: 78,
        followed_by: 116844,
        follows: 23
    },
    id: "1386028045"
}
}

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
11