W
W
WebDev2017-07-20 11:27:37
Facebook
WebDev, 2017-07-20 11:27:37

Does Facebook Graph API render images?

Hello.
I get the user's post feed:

$fields = [ 'full_picture', 'description', 'name'];

                    $fields  = implode(',', $fields);
                    $result  = file_get_contents('https://graph.facebook.com/v2.9/' . $facebook_user_id . '/posts/?limit=30&access_token=' . $access_token . '&fields=' . $fields);
                    $content = json_decode($result, true);

In response, I get an array, where full_picture is the picture from the post. The problem is that the picture is returned square. For example, like this , but the original post , the picture is rectangular in it. That is, wherever the picture is not square, it is cropped.
I tried another way - to get a picture here at this address
https://graph.facebook.com/111128592785693/picture?type=large

But firstly, it is much smaller, although large, and secondly, it is just as cropped.
Tell me, who faced, how to be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question