Hello,
For whoever is interested, i've written a little facebook application to integrate my zenphoto gallery into facebook. Photos are not uploaded to fb but rather directly fetched from the site, so this requires a few additional files to be installed on the gallery server. There may still be a few kinks, and some more testing may be needed (f.i. my host doesn't allow url rewriting so i have no idea how it will behave in that case). Anyway if you think this may be interesting i could open a trac issue and attach the sources. The url if you have a fb account and want to test it:
http://apps.facebook.com/zenface-- gd
Comments
I've tested it and it works great for me -- using URL rewriting.
However there is a detail you didn't mention, but which is very important if you want your app to work: you need PHP5 or your zp-facebook/common.php script will not work. It took me a little time to figure this out, but it works great once PHP5 is activated (on 1and1.fr you just have to add "AddType x-mapp-php5 .php" in your .htaccess).
Thanks!
I come from a Java background and php5 seems way more natural to me than php4 - although it doesn't come without its flaws but i guess i'm just not fluent enough in php. Nevertheless if you want to give it a bit more testing, you could try to replace common.php with http://fbzp.free.fr/common-php4 (rename it to common.php). I can't garantee it will work but i have high hopes. If it does i'll update the zip file.
Are you planning to add features ? Hit me if you need any suggestions, I have lots.
Thanks for testing! Actually i'm already working on the next version. I'm pretty overbooked recently so this doesn't progress really fast, thus i have just scratched the settings screens. I'll try to add profile box customization, virtual galleries, and integrate facebook "social" api (let your "friends" tag and add comments, filtered notifications, etc.).
The next version is being developped under zenface-dev (btw i think the app canvas url seems odd now since the app has been renamed to zenbook due to facebook naming policy).
On a different topic, I'm not notified when this subject is updated; and i wonder if it is possible to subscribe to a bbpress thread (to be notified by mail, without relying on a rss reader).
I believe there is no e-mail notification build in.
I am using PHP5.
Any thoughts?
Still very cool, thanks!
Error
Unexpected error.
I've just changed a few things (in zenface-dev) in the way i retrieve the album name. The gallery page and album page are affected by those changes. So could you try to install zenface-dev (no changes are required concerning the integration files) and tell me if that fixes your problem ? I haven't yet tackled the whitespace issue.
Let us know if the php code changes as well...
What is tagged in zenface ? Is it the zenphoto tags ?
For now those settings are not effective (they're not concretized in the gallery pages). They can only be saved but are not used yet (and the friend includes/excludes list is actually not yet saved). However my idea was to allow tagging and commenting at zenphoto level: adding a tag (resp. a comment) in zenbook will imply a request to your zenphoto gallery - this is not a facebook's tag. So it is indeed a zenphoto tag.
Concerning the profile box customization, i'm still not sure of its feasibility as running a cron is not an option here. If real time randomization is not possible, it will require a manual refresh of the profile box (through the settinqs page).
Does this make sense ?
http://apps.facebook.com/zenface-dev/?q=album&owner=502738435&album=yself/
That link the end should point to myself not yself so I can't figure out why its cutting apart my links, thats the source of my errors, if I mainly correct the url, it works fine.
Profile box content is statically cached. So pushing new user-dependent content (to randomize profile box content) requires to periodically refresh that content. It is usually done (on fb) with a cron task. It is actually, from what i've read, the preferred way to do it.
Images are also cached by url. So we migt need to randomize the url as well. I think of a couple of options to attain profile box customization but i'm not sure of the feasibility of the solution. It would consist in accessing the resource through a randomized url. The image stream would be written on the response output, but before that new content should be pushed to the profile. I still need to try it to validate the approach.
Alternatively displaying the last n albums on the profile box has a number of shortcomings. Since the communication between zenbook and zenphoto is (for now at least) unidirectional, zenbook would't be able to refresh the profile box when an album is added on the zenphoto side.
That was quite a long explanation which, i hope, should clarify the profile box issues i'm facing right now.
I've added some minimalist client-side debugging support in zenbook dev (server-side controlled through configuration). On the gallery page, after the album list, the album name construction steps are listed for each album. If you experiment some issues with the album names, please have a look at it and let me know how the name is retrieved.
Additionally i've added some pseudo-random profile content: When random profile box style is chosen (on form submit), we grab 12 random images on the zp site, and push them to the profile box as <fb:random-option>. This solution is still not ideal though functionnal (please note that profile content is not yet polished - i still need to add gallery info). I might add later an option to specify the number of random items to fetch.
You will need to update your integration files to see those changes (link on zb-dev general settings page).
I took bascially your first post as a description for now.