Jump to content


Photo

Facebook PHP SDK failing to retrieve large pictures

facebook sdk php api

  • Please log in to reply
No replies to this topic

#1 tghmember

tghmember

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 28 July 2014 - 04:29 AM

Hello everyone, I'm new here

 

My website was working fine until a few days ago, Up until then my str_replace('s130x130', 's800x800') and str_replace('_s', '_o') solved the picture thing. Now the images are broken (or very small) and I can find no documentation on how to enlarge the pictures. Thus my question: how do I retrieve larger pictures from the Facebook PHP SDK?

Code

foreach($pagefeed['data'] as $post) {
if ($post['type'] == 'status' || $post['type'] == 'link' || $post['type'] == 'photo') {
if ($post['type'] == 'photo') {
echo "<div class='col-md-6 col-sm-6'>";
echo "<div class='thumbnail'>";
echo "<img src=" . str_replace('s130x130', 's800x800',
str_replace('_s', '_o', $post['picture'])) . " />";
echo "<div class='caption'>";
echo "<sup>Geplaatst op: " . date("d-m-Y, (strtotime($post['created_time']))) . "</sup>";

if (empty($post['message']) === false) {
echo "<p><span class='glyphicon glyphicon-comment'></span> " . $post['message'] . "</p>";}

echo "</div>";
echo "</div>";
echo "</div>";
$i++;
}
}
}

Thanks in advance!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com