(#12) picture edge for this type is deprecated for versions v2.3 and higher
I think I will try to post on the FB grap api forum and see if anyone has any idea if it can be done, but if you have any other suggestions please let me know.
You might also have to set the default Protocol value as https though I'd have to debug to remember, I don't know if Facebook will redirect or refuse the request.
The first two images display fine and crop correctly but the third image coming from FB is not showing and I get the following error 500 internal server error:
I've contributed to Imageprocessor to resolve this so it should work in the next release of ImageProcessor. You'll need to add a useragent setting to the remote service setting though.
Facebook Images and ImageProcessor.Web
Hello.
I am trying to use imageprocessor.web to crop an image coming from Facebook Graph API.
The URL of the image that I get from the Graph API field (“full_picture”) is:
https://scontent.xx.fbcdn.net/v/t1.0-9/s720x720/130919289377114863447082713745171335119158_n.jpg?oh=49394c5fa01be55639ee665752aeea35&oe=5800CA66
When I add to the query string &anchor=center&mode=crop&width=248&height=93
the image does not show anymore.
https://scontent.xx.fbcdn.net/v/t1.0-9/s720x720/130919289377114863447082713745171335119158_n.jpg?oh=49394c5fa01be55639ee665752aeea35&oe=5800CA66&anchor=center&mode=crop&width=248&height=93
I have tried using /remote.axd/ but it did not make any difference.
Anyone can point me in the right direction?
Thank you.
Assuming that the image appears prior to including the query string, I believe I may have a solution.
This is just a stab in the dark but perhaps the s720x720 in the URL refers to the size (s) of the image (720x720).
You could try altering the URL to something along the lines of:
https://scontent.xx.fbcdn.net/v/t1.0-9/s248x93/130919289377114863447082713745171335119158_n.jpg?oh=49394c5fa01be55639ee665752aeea35&oe=5800CA66
I may be wrong, but it might be worth trying out.
Hi Rhys,
Thank you for your suggestion.
I tried but it did not work,I would guess that "s720x720" is a folder.
Hi Giorgio,
You may very well be right! I had a quick look online and came across a (hopefully) useful link: https://developers.facebook.com/docs/graph-api/reference/page/picture/
From what I have read, in order to achieve your desired result, images should be formatted something along the lines of:
https://graph.facebook.com/4/picture?width=100&height=100
This may explain why using ImageProcessor.Web to crop a Facebook image fails to display the expected result.
Hopefully this helps to - at the very least - point you in the right direction.
Hi Rhys
Thank you for your help... I think that is very useful and hopefully pointing me in the right direction.
What I am trying to get are the photos included in the posts from a user feed.
/{user-id}/posts
https://developers.facebook.com/docs/graph-api/reference/v2.6/user/feed
when I query https://graph.facebook.com/371535272962335/posts?fields=fullpicture,message,createdtime&access_token=****";
I get back a JSON response that contains "full_picture":
"data": [ { "fullpicture": "https://scontent.xx.fbcdn.net/v/t1.0-9/134507499674281367063769197606519706136545n.jpg?oh=ed050343e82bef662ad9fcdc992b461b&oe=57EDD623", "message": "Happy coding to everyone", "createdtime": "2016-06-18T07:05:45+0000", "id": "371535272962335967428136706376" },
I tried to pass the object id to the following call: https://graph.facebook.com/371535272962335963422297106960/picture?width=100&height=100&accesstoken=**
but that returned an error:
(#12) picture edge for this type is deprecated for versions v2.3 and higher
I think I will try to post on the FB grap api forum and see if anyone has any idea if it can be done, but if you have any other suggestions please let me know.
Thanks again
Hi Giorgio?
Have you added the url to the whitelist in the security.config file?
http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/#remote
You might also have to set the default
Protocol
value ashttps
though I'd have to debug to remember, I don't know if Facebook will redirect or refuse the request.Cheers
James
Hi James
Thank you for your help.
I have tried what you suggested but unfortunately is still not working.
The following is my security.config file, I tried witht LocalFileImageService and with CloudImageService and I get the same result.
And here is my HTML
The first two images display fine and crop correctly but the third image coming from FB is not showing and I get the following error 500 internal server error:
If you have any other suggestions please let me know.
Thank you.
I've contributed to Imageprocessor to resolve this so it should work in the next release of ImageProcessor. You'll need to add a useragent setting to the remote service setting though.
is working on a reply...