bobolounna / restfb

Automatically exported from code.google.com/p/restfb
0 stars 0 forks source link

Enable the client to work on picture connection requests #116

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The picture connection of a user does not return a JSON object but the profile 
picture itself. This is done by resolving the endpoint via a 302 redirect to 
the actual image URL.

In effect, it is not possible to use restfb to resolve the Graph picture 
connections.

It would be helpful to change the client to detect the 302 redirect of a 
picture, read the target URL from the headers of the server response and return 
that as a string.

Original issue reported on code.google.com by kong...@gmail.com on 20 Feb 2011 at 7:12

GoogleCodeExporter commented 8 years ago
This is an alternativ approach to issue 102

Original comment by kong...@gmail.com on 20 Feb 2011 at 7:14

GoogleCodeExporter commented 8 years ago
Do you need the actual binary content of the image itself?  Or the "internal" 
URL that gets 302d-to?

IOW does constructing a string like "http://graph.facebook.com/revetkn/picture" 
not work for your use case (you do not need an access token or anything for 
picture URLs to work)?

Original comment by mark.a.a...@gmail.com on 23 Feb 2011 at 3:40

GoogleCodeExporter commented 8 years ago
I was actually not thinking of the binary (that would be a bit sophisticated) 
but of the "internal" URL that gets 302d to.

However, I now realised that the graph URL indeed always resolves even without 
token so the URL can be constructed easily as soon as you know the ID of the 
object. I feel this is actually a big privacy issue as it means that all 
profile pictures are in effect public and could easily be crawled by just 
iterating over ID numbers, but that's a different topic.

I suggest you close this request. The library doesn't cover the picture 
connection request but the workaround is so easy that it's probably not worth 
the effort to further debate this.

Original comment by kong...@gmail.com on 23 Feb 2011 at 9:34

GoogleCodeExporter commented 8 years ago
Roger that.  Closing out, thanks for the followup.

Original comment by mark.a.a...@gmail.com on 23 Feb 2011 at 5:28

GoogleCodeExporter commented 8 years ago
That probably means you can close issue 102 as well.

Original comment by kong...@gmail.com on 23 Feb 2011 at 5:30

GoogleCodeExporter commented 8 years ago
Good call, thanks.

Original comment by mark.a.a...@gmail.com on 23 Feb 2011 at 5:31