0

I want to get the the original picture out of this Facebook link:

https://fbexternal-a.akamaihd.net/safe_image.php?d=AQCPdu0qFIMkMPGN&w=470&h=246&url=https%3A%2F%2Fscontent-lax3-1.xx.fbcdn.net%2Fhphotos-xfp1%2Fv%2Ft1.0-9%2F12705743_10153625263299678_1238692121976712825_n.jpg%3Foh%3D0f330b83cd6f52cba12b06ea141af571%26oe%3D5723078F&cfs=1&upscale=1&sx=1&sy=0&sw=558&sh=292&ext=png2jpg

What I usually do is get the value of url parameter and decode it to get the S3 link. The result of applying this to this link is

https://scontent-lax3-1.xx.fbcdn.net/hphotos-xfp1/v/t1.0-9/12705743_10153625263299678_1238692121976712825_n.jpg

But it gives me 403 response. How should I obtain the link of the original photo?

bastelflp
  • 9,362
  • 7
  • 32
  • 67
Khaled Karam
  • 173
  • 1
  • 4
  • 13
  • 1
    That could be forbidden for reasons. Are you performing any sort of authentication through your code? – Obsidian Feb 14 '16 at 14:02
  • No, we get the first Url through the public image attached to the post. and we try to get the original url because we need bigger picture size. – Khaled Karam Feb 14 '16 at 14:04

1 Answers1

1

It works for me. I copied the url value of your first link and everything to the right into this online decoder:

http://meyerweb.com/eric/tools/dencoder/

And obtained:

https://scontent-lax3-1.xx.fbcdn.net/hphotos-xfp1/v/t1.0-9/12705743_10153625263299678_1238692121976712825_n.jpg?oh=0f330b83cd6f52cba12b06ea141af571&oe=5723078F&cfs=1&upscale=1&sx=1&sy=0&sw=558&sh=292&ext=png2jpg

Which works fine.

Apparently the oh and oe parameter are essential. Here the minimal working link:

https://scontent-lax3-1.xx.fbcdn.net/hphotos-xfp1/v/t1.0-9/12705743_10153625263299678_1238692121976712825_n.jpg?oh=0f330b83cd6f52cba12b06ea141af571&oe=5723078F

robert
  • 978
  • 7
  • 17