[edit] Issues

Q: This link facebook_php5_photoslib.php on photoupload in php is invalid or broken link, is it possible to make it valid ? or Where can i get that(facebook_php5_photoslib.php) php file ?

A: I have fixed it. Thanks


Q: Does this really work? When I use the example code provided, it doesn't upload the image to the specified album. If I don't specify an album, it creates a new one for my application but still doesn't upload the image.

A: The solution was changing the path of my image file. It wasn't working when I was using the whole URL ($filename = "http://www.myapp.com/image.jpg"), but it works perfectly when I use the shortened form ($filename = "image.jpg").

--

How do you upload images from a user's computer instead of from a URL?

--

Never exiting while loop... For some reason, when I use your code, the post_request method loops indefinitely... it seems the socket is never returning a EOF, I print out the $temp variable and all I get is a recurring " " (single space) right after:

HTTP/1.1 200 OK Date: Fri, 08 Jun 2007 19:35:23 GMT Server: Apache/1.3.37 Expires: Mon, 26 Jul 1997 05:00:00 GMT Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Keep-Alive: timeout=60, max=972 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/xml;charset=utf-8

I have PHP 5+ installed, using HostGator as my host (apache)... Not sure what the issue is, looks like we are getting a valid HTTP response every time, just nothing after that.

Facebook times out after more than 100 iterations of the loop, says my server isn't responding, so I put a counter in there so I was able to see the first 100 lines... most of them a single space...

[edit] Code Update

The code has been update to support CURL on for servers that have this module installed. Hopefully this will resolve the problems some people are having. eyeRmonkey 02:18, 11 June 2007 (MST)

I updated the source code on the page so now it's matching the package content.