Open HartLarsson opened 8 years ago
I don't know if it's the right thing to do, but was having the same problem and updating the getExternalImageURL like this made the images appearing.
getExternalImageURL: function(image_url, parameter) {
image_url = decodeURIComponent(image_url).split(parameter + '=')[1];
if (image_url.indexOf('fbcdn-sphotos') === -1) {
image_url = image_url.split('&')[0];
if(image_url.indexOf("fbstaging") !== -1) {
image_url = "https://external.xx.fbcdn.net/safe_image.php?url="+encodeURIComponent(image_url);
}
return image_url
} else {
return image_url;
}
},
As you can see, i add a new check to see if the image is from "fbstaging", appending the safe_image.php to correctly view the image.
Hope it's useful, at least as a starting point.
thank you so much i did a similar workaround too :) I've also forced the css to display image from shared posts:
.social-feed-element .attachment {
vertical-align: middle;
-ms-interpolation-mode: bicubic;
/* forcing shared post thumbnails */
display: inline !important;
}
Thank you once again @zenzei, helped me today
i still testing the script and using on one of my fb feed i discover that is not possible to get any picture from this json :
As you can see the picture URL refer to a staging:resource. I don't know why the shared post that have a pic has a staging state but using the url as is yuo get 130x130 thumbnail. By changing w and h parameter you can get different sizes.
looking inside the script this part is responsible of gettign the attachment:
Someone have found a solution to get in some way the thumbnail image? I've seen that also FB video thumbnails have the same stage status. If we found a workaround to fix that, we can get fb video preview too.
thank you