実行結果' ; // エラー判定 if( !$obj || !isset($obj->data) ) { $html .= '

データを取得できませんでした…。設定を再確認して下さい。

' ; } else { foreach( $obj->data as $item ) { // 各データの整理 $id = $item->id ; // ユーザーID $username = $item->username ; // ユーザー名 $bio = ( isset( $item->bio ) ) ? $item->bio : '' ; // 紹介文 $website = ( isset( $item->website ) ) ? $item->website : '' ; // ウェブサイト $profile_picture = ( isset( $item->profile_picture ) ) ? $item->profile_picture : '' ; // アイコン画像 $full_name = ( isset( $item->full_name ) ) ? $item->full_name : '' ; // フルネーム // ブラウザに出力 $html .= '
' ; $html .= '
ユーザーID
' ; $html .= '
' . $id . '
' ; $html .= '
ユーザー名
' ; $html .= '
' . $username . '
' ; // フルネーム if( $full_name ) { $html .= '
フルネーム
' ; $html .= '
' . $full_name . '
' ; } // 紹介文 if( $bio ) { $html .= '
紹介文
' ; $html .= '
' . $bio . '
' ; } // ウェブサイト if( $website ) { $html .= '
ウェブサイト
' ; $html .= '
' . $website . '
' ; } // アイコン画像 if( $profile_picture ) { $html .= '
アイコン画像
' ; $html .= '
' ; } $html .= '
' ; } } // 取得したデータ $html .= '

取得したデータ

' ; $html .= '

下記のデータを取得できました。

' ; $html .= '

JSON

' ; $html .= '

' ; $html .= '

レスポンスヘッダー

' ; $html .= '

' ; // アプリケーション連携の解除 $html .= '

アプリケーション連携の解除

' ; $html .= '

このアプリケーションとの連携は、下記設定ページで解除することができます。

' ; $html .= '

https://instagram.com/accounts/manage_access/

' ; ?> Instagramでリクエスト中のユーザーを取得するサンプルデモ

配布元: Syncer