entry; } function cutMessage($strTemp){ $aStrMes = explode("\n\n", $strTemp); return $aStrMes[0]; } $fbid='207626835964774'; $strN = "\n"; $fbLimit=10; $fbCount=0; //$myPosts=loadFB($fbid); date_default_timezone_set('Asia/Tokyo'); $facebook_page_id = '207626835964774'; $access_token = '743071085776774|zDwdMly37pI4GS_BiCEzwOJoZZQ'; $url = 'https://graph.facebook.com/' . $facebook_page_id . '/posts?access_token=' . $access_token . '&fields=id,message,created_time,picture,name'; $res = file_get_contents($url); $data_array = json_decode($res, TRUE); echo ''; echo ''; echo ''; echo ''; echo 'Vintage ROLEX / ヴィンテージ ロレックス コレクション by クォーク'; echo ''; echo ''; echo ''; echo ''; echo ''; $facebookData = $data_array['data']; foreach($facebookData as $key => $val){ $aStrID = explode('_',$facebookData[$key]['id']); echo '' , $strN; echo '' , $strN; $dTime = strtotime($facebookData[$key]['created_time'] ); $myTime = date('n.j G:i',$dTime); echo '
' , $myTime , '
' , $strN; echo nl2br(cutMessage($facebookData[$key]['message'])) , $strN; echo '

'; $fbCount++; if($fbCount >= $fbLimit) break; } echo ''; ?>