1
votes

what I am trying to do is to get event photo by event ID. Code I have :

function getFBphoto(event) {
    FB.api(
        "/"+ event +"/picture?width=500&height=500",
        function (response) {
            if (response && !response.error) {
               console.log(response);
            }
        }
    );}

Facebook still provides me with 200px sized image, I've tried to follow some advices and tried luck with such version of my code:

function getFBphoto(event) {
    FB.api(
        "/"+ event +"/picture",
        {
            "redirect": false,
            "height": "500",
            "type": "normal",
            "width": "500"
        },
        function (response) {
            if (response && !response.error) {
               console.log(response);
            }
        }
    );}

No luck, still max 200x200px photo, while adding parameters large still doesn't affect to get bigger photo.

Example response from fb in both cases:

 Object {data: Object}
data: Object
height: 50
is_silhouette: false
url: "https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/t1/c114.0.200.200/p200x200/1656179_10201352079056227_1689058768_n.jpg"
width: 50
__proto__: Object
__proto__: Object

The question is: How to get actual size photo of event (for eg: https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-prn2/t1/1507953_584284274994290_910086685_n.jpg) with API call.

1

1 Answers

3
votes

Try the cover field – for your event, /471101519656645?fields=cover -> delivers this image.