å®è¡çµæ' ;
// ã¨ã©ã¼å¤å®
if( !$obj || !isset($obj->data) )
{
$html .= '
ãã¼ã¿ãåå¾ã§ãã¾ããã§ããâ¦ãè¨å®ãå確èªãã¦ä¸ããã
' ;
}
else
{
foreach( $obj->data as $item )
{
// åãã¼ã¿
$id = $item->id ; // ã¡ãã£ã¢ID
$type = $item->type ; // ã¡ãã£ã¢ã¿ã¤ã
$link = $item->link ; // ãªã³ã¯
$images = $item->images->low_resolution->url ; // ç»å
$date = $item->created_time ; // æ¥ä» (UNIX TIMESTAMP)
$likes = ( isset($item->likes->count) ) ? $item->likes->count : 0 ; // ã©ã¤ã¯æ°
$comments = ( isset($item->comments->count) ) ? $item->comments->count : 0 ; // ã³ã¡ã³ãæ°
// ã¦ã¼ã¶ã¼æ
å ±
$user_id = $item->user->id ; // æ稿è
ID
$user_name = $item->user->username ; // æ稿è
ã®ã¦ã¼ã¶ã¼ãã¼ã
$user_full_name = ( isset($item->user->full_name) ) ? $item->user->full_name : '' ; // æ稿è
ã®ã¦ã¼ã¶ã¼ãã¼ã
$user_profile_picture = ( isset( $item->user->profile_picture ) ) ? $item->user->profile_picture : '' ; // ã¢ã¤ã³ã³ç»å
// å ´ææ
å ±
$location_id = ( isset($item->location->id) ) ? $item->location->id : '' ; // å ´æID
$location_name = ( isset($item->location->name) ) ? $item->location->name : '' ; // å ´æå
$location_lat = ( isset($item->location->latitude) ) ? $item->location->latitude : '' ; // 緯度
$location_long = ( isset($item->location->longitude) ) ? $item->location->longitude : '' ; // çµåº¦
// ã¿ã°æ
å ±
$tags = ( isset($item->tags) && !empty($item->tags) ) ? '#' . implode( 'ã#' , (array)$item->tags ) : '' ;
// æ¥ä»ã®æ´å½¢
$date = date( 'Y/m/d H:i' , $date ) ;
// ãã©ã¦ã¶ã«åºå
$html .= '' ;
$html .= '- æ稿è
ã®ID
' ;
$html .= '- ' . $user_id . '
' ;
$html .= '- æ稿è
ã®ã¦ã¼ã¶ã¼ãã¼ã
' ;
$html .= '- ' . $user_name . '
' ;
// ãã«ãã¼ã ãããå ´å
if( $user_full_name )
{
$html .= '- æ稿è
ã®ãã«ãã¼ã
' ;
$html .= '- ' . $user_full_name . '
' ;
}
// ã¢ã¤ã³ã³ç»åãããå ´å
if( $user_profile_picture )
{
$html .= '- æ稿è
ã®ã¢ã¤ã³ã³
' ;
$html .= '' ;
}
$html .= '- ã¡ãã£ã¢ID
' ;
$html .= '- ' . $id . '
' ;
$html .= '- ã¡ãã£ã¢ã¿ã¤ã
' ;
$html .= '- ' . $type . '
' ;
$html .= '- ã¡ãã£ã¢ãã¼ã¸
' ;
$html .= '- ' . $link . '
' ;
$html .= '- ã¡ãã£ã¢
' ;
// ã¦ã¼ã¶ã¼ã®ã¿ã°ä»ããããå ´å
if( isset($item->users_in_photo) && !empty($item->users_in_photo) )
{
$html .= '- ' ;
$html .= '
' ;
$html .= '
' ;
// ã¿ã°ä»ããããã¦ã¼ã¶ã¼ãé
ç½®ãã¦ãã
foreach( $item->users_in_photo as $user )
{
if( isset($user->user->username) && isset($user->user->profile_picture) && isset($user->position->y) && isset($user->position->x) )
{
$x = ( 250 * $user->position->x ) - 15 ;
$y = ( 250 * $user->position->y ) - 15 ;
$html .= '
' ;
}
}
$html .= '
' ;
$html .= '
â»' . count( $item->users_in_photo ) . '人ã®ã¦ã¼ã¶ã¼ãã¿ã°ä»ãããã¦ãã¾ãã
' ;
$html .= ' ' ;
}
else
{
$html .= '' ;
}
$html .= '- æ稿æ¥æ
' ;
$html .= '- ' . $date . '
' ;
$html .= '- ã©ã¤ã¯æ°
' ;
$html .= '- ' . $likes . '
' ;
$html .= '- ã³ã¡ã³ãæ°
' ;
$html .= '- ' . $comments . '
' ;
// å ´æIDãããå ´å
if( $location_id )
{
$html .= '- å ´æID
' ;
$html .= '- ' . $location_id . '
' ;
}
// å ´æåãããå ´å
if( $location_name )
{
$html .= '- å ´æå
' ;
$html .= '- ' . $location_name . '
' ;
}
// 緯度ãçµåº¦ãããå ´å
if( $location_lat && $location_long )
{
$html .= '- å°å³
' ;
$html .= '- Google Mapsã§ä½ç½®ã確èªãã
' ;
}
// ããã·ã¥ã¿ã°ãããå ´å
if( $tags )
{
$html .= '- ã¿ã°æ
å ±
' ;
$html .= '- ' . $tags . '
' ;
}
$html .= '
' ;
}
}
// åå¾ãããã¼ã¿
$html .= 'åå¾ãããã¼ã¿
' ;
$html .= 'ä¸è¨ã®ãã¼ã¿ãåå¾ã§ãã¾ããã
' ;
$html .= 'JSON
' ;
$html .= '' ;
$html .= 'ã¬ã¹ãã³ã¹ãããã¼
' ;
$html .= '' ;
// ã¢ããªã±ã¼ã·ã§ã³é£æºã®è§£é¤
$html .= 'ã¢ããªã±ã¼ã·ã§ã³é£æºã®è§£é¤
' ;
$html .= 'ãã®ã¢ããªã±ã¼ã·ã§ã³ã¨ã®é£æºã¯ãä¸è¨è¨å®ãã¼ã¸ã§è§£é¤ãããã¨ãã§ãã¾ãã
' ;
$html .= 'https://instagram.com/accounts/manage_access/
' ;
?>
Instagramã§ã¦ã¼ã¶ã¼ã®ã¿ã¤ã ã©ã¤ã³ãåå¾ãããµã³ãã«ãã¢
é
å¸å
: Syncer