Web サイトにある Facebook フィードに以下のコードを使用しています。問題は、画像とニュースが想定どおりにリストされることですが、私の人生では、画像を配置して、関連するテキストを右側にうまく表示する方法がわかりません。誰か助けてください。
コードは次のとおりです。
<?php
//Get the contents of the Facebook page
$FBpage = file_get_contents('https://graph.facebook.com/135860723149188/feed? access_token=456215171075777|OcFg4Sf293Pg3NXeJkg1h3Bg8wE'
);
//Interpret data with JSON
$FBdata = json_decode($FBpage);
//Loop through data for each news item
foreach ($FBdata->data as $news ) {
//Explode News and Page ID's into 2 values
$StatusID = explode("_", $news->id);
echo '<li class="fbframe"; style="list-style:none;" >';
//Check for empty status (for example on shared link only)
if (!empty($news->picture)) {
printf ('<img src="%s" alt="Image from Facebook" />', $news->picture);
}
if (!empty($news->message)) { echo $news->message; }
echo '</li>';
} //end of fbframe
?>
あなたが提供できる助けを前もって感謝します。