LoginSignup
2
1

More than 5 years have passed since last update.

SandBoxだと自分の投稿へのコメントが取れない(Instagram の APIの話)

Last updated at Posted at 2017-05-18

自分の投稿した写真へのコメントを取得したい。自分の投稿へのコメントなんだからSandBoxで実現できるだろうと思って試してみたが、出来なかった。

ドキュメントのSandBoxの API Behavior にはこうある。

The first point is important and it means that the API behaves as if the only users on Instagram were your sandbox users, and the only media ever posted were the last 20 for each of these users.
(Google翻訳:最初の点は重要であり、Instagram上の唯一のユーザーがサンドボックスユーザーであるかのようにAPIが動作し、過去に投稿されたメディアがこれらのユーザーの最後の20だったことを意味します。)

要するに、投稿が自分のものであってもSandBoxの世界には存在しない自分以外のユーザーがしたコメントを /media/{media-id}/comments で取得することはできない、ということらしい(自分の投稿に自分がしたコメントは取れる)。
ただし、/media/{media-id} のレスポンスには "comments": { "count": 3 } のような件数が含まれていて、これは自分以外がしたコメントもカウントされている。一貫性がないぞ。

参考

Sandbox Mode • Instagram Developer Documentation

Instagram Developer Documentation
Instagram APIでwebサービスを作りたい全ての人に向けて書きました
Instagram APIを使ってWEBサイトに写真を表示させてみよう|株式会社カポタスト
InstagramのAPIで写真を取得する【準備編】 | デジタルコンサルタントAWS
instagramのuser idを取得する方法
Instagram APIをPHPでさくっと使う - Qiita
インスタグラムAPIが仕様変更し、アプリケーション・サービスへの利用には申請と承認が必要に
保存版】Instagramの審査の流れ、手順、必要なものまとめ - Qiita
Instagram APIの利用方法 - Qiita
【2017年2月更新】 超厳しい Instagram API の審査基準 を翻訳した - 俺、サービス売って家買うんだ
Instagram APIの審査、承認までの流れ | 株式会社クラヴィス

2
1
0

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
2
1