Jump to content

Facebook PHP SDK failing to retrieve large pictures


tghmember

Recommended Posts

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.