MyFBZen
ZenPhoto/Facebook Integration
Attention: this code is not a WordPress plugin.
I need to be able to have my facebook profile to link to my ZenPhoto. So the was a start for this integration tool.
Installation:
1. Download the code (link below).
2. Upload it to zp-core directory of your ZenPhoto.
3. Visit MyFBZen page and activate. Provide the app with your ZenPhoto URL, that’s it!
Download:
Change log:
July 7, 2009
- fix issue with folder names containing space
- fix invalid URL
[...] MyFBZen [...]
Updates: MYFBZen now working with latest ZenPhoto and Facebook.
Just remember to revisit the MyFBZen homepage in your Facebook whenever you have finished uploading albums. It need to be updated manually. I’m thinking on the automation in next updates.
I try to use this aplication, but it does not work. I downloaded the file, extracted it, edit the database info and uploaded to my zp-core folder in my server. Then I went to facebook and allowed the application. I keep getting a warning that says:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘bluepaci’@'localhost’ (using password: NO) in /home/bluepaci/public_html/harlanphotos/zp-core/fbzen.php on line 16
Could not connect : Access denied for user ‘bluepaci’@'localhost’ (using password: NO)
what is wrong??
Well actually adriana you don’t need to change anything in the fbzen.php. Just leave it as is, it will read the the database info from zenphoto config file.
What you need to change are the values at the facebook application (myfbzen).
Doesn’t work for me. It seems that $conf['album_folder'] is replacing slashes and spaces with dashes, and is also lower-casing characters. http://photos.redshade.net/zp-core/fbzen.php?url=http://photos.redshade.net&album=1 returns:
Warning: dir(..//albums/everything-2008-2008-christmas/) [function.dir]: failed to open dir: No such file or directory in /var/www/gallery/zp-core/fbzen.php on line 58
Fatal error: Call to a member function read() on a non-object in /var/www/gallery/zp-core/fbzen.php on line 60
The correct path for the album should be “../albums/2008/2008\ Christmas/”
Hi,
I tried adding your application to my facebook. I keep getting this.
error3!
That’s all I see. Can you tell me what the problem is?
Hi Dustin, please download latest fbzen code and tell me the result.
JB, it just got it fixed. Please tell me the result.
Hi Basri,
did you test this with ZenPage and on a root installation?
Nothing seems to happen on my facebook page when I create new galleries or post new News on my homepage…
hi mypart, i think you might get a wrong idea. it’s not ZenPage and it is not about any news. Did you follow step 1,2 & 3 above?
I have just created my zenphoto page using version 1.2.6, then went to the FaceBook link you had provided and followed your instructions.
But then I do not see anything new in my profile.
Do I need to do something extra in FaceBook?
Seems like starting with version 1.2.6 the zp-config.php file has moved to the zp-data folder and is no longer in the zp-core folder.
Adding the application to my page results in a no Search results message?
Ok just noticed that if I choose move to boxes, I can see the albums. But if I move it to the wall tab, then it will not display the albums; saying that nothing to display until content has been added.
That is strange. is this a bug?
hi john, yes i think you are right about the box & wall tab issue. i’ll figure it out. at the moment only boxes working.
Hi Basri,
Thanks. Hope to see more of this neat application.
Hi again Basri,
sorry I was away so I couldn’t respond earlier.
I do have zenphoto set up to use ZenPage and the mixed news and gallery on index option activated, in doing so I have no unique “galleries” page which might be the problem.
In my set up, whether I post news or upload a new album, they both refresh the index page.
I dropped fbzen.php into the zp-core directory and tried specifying my homepage with and without the www on the facebook-app page but nothing seems to happen…
On the facebook-app page I get returned to the same page where I can submit my address, I figured this is the way it is supposed to be, but maybe it is not?
Any ideas?
I don’t need MyFBZen to display my news posts, just new galleries would allready be all I need.
Sorry to be a pain…
Can’t seem to get this app working…
Here’s the error I’m getting..
Fatal error: Uncaught exception ‘FacebookRestClientException’ with message ‘Failed when fetching the data from http://images.0utram.org/zp-core/fbzen.php?url=http%3A%2F%2Fimages.0utram.org%2F&album=1. Error: The requested URL returned error: 500′ in /home/gambus/public_html/obama4allof/facebook/facebook-platform/client/facebookapi_php5_restlib.php:1520 Stack trace: #0 /home/gambus/public_html/obama4allof/facebook/facebook-platform/client/facebookapi_php5_restlib.php(566): FacebookRestClient->call_method(‘facebook.fbml.r…’, Array) #1 /home/gambus/public_html/obama4allof/facebook/fbzen/index.php(122): FacebookRestClient->fbml_refreshRefUrl(‘http://images.0…‘) #2 {main} thrown in /home/gambus/public_html/obama4allof/facebook/facebook-platform/client/facebookapi_php5_restlib.php on line 1520
Hope this helps you with bugfixing.
Outram
I have my zenphoto build in:
http://www.mydomain.com/gallery/
instead of the default:
http://www.mydomain.com/zenphoto/
I get no errors when saving changes on
http://apps.facebook.com/myfbzen/
but no pictures from my zenphoto make it to my FB profile. Is it because of my non-standard installation folder?
Thanks
I get this message inside the facebook Box:
Parse error: syntax error, unexpected ‘[‘ in /var/www/zenphoto/zp-core/fbzen.php on line 26
I made a few changes that seem to get it moving.
I changed initialization code:
require_once(“../zp-core/folder-definitions.php”);
include(“../” . DATA_FOLDER . “/zp-config.php”);
require_once(“../” . ZENFOLDER . “/template-functions.php”);
And I fixed up the thumb generation (works with external directories):
$tempthumb=$myurl . $picline[1] . ‘/image/thumb/’ . get_random_thumb($albumfolder . ‘/’ . $picline[1]. ‘/’);
I also added some special character handling (I have apostrophes in some album titles):
while($picline = mysql_fetch_row($albumresult))
{
$albumfolder = getAlbumFolder();
$tempthumb=$myurl . htmlspecialchars($picline[1], ENT_QUOTES) . ‘/image/thumb/’ . htmlspecialchars(get_random_thumb($albumfolder . ‘/’ . $picline[1]. ‘/’), ENT_QUOTES);
$output=$output.”“. htmlspecialchars($picline[2], ENT_QUOTES).”“;
}
when the box is moved to the main page it displays this, any thoughts?
No content to display.
This box will not be visible to people who view your profile until this application adds content to it.
Is this project still active?
Basri, perhaps we could help with development to keep this going?
Hi all, I’m very sorry I could not get the script updated on a regular basis. If anyone would like to assist, I am more than happy to send the code on the server end which is with me rite now. I am contactable at mightyhitter [at] gmail.com
I get the following error when I try to update my facebook page:
Parse error: syntax error, unexpected ‘[‘ in /home/raphsammut/photos.raphsammut.ca/zp-core/fbzen.php on line 26
I’ve used the original fbzen.php file.. is there an error in the file or is something wrong on my end?
Something wrong in php file, please see my fixes above.
Basri, I emailed you a week ago, but have not heard back yet.
I tried to get this working tonight but no success. I added the three lines (replacing include(“zp-config.php”);) mentioned by Jay but all I ended up with on the facebook end was a page that looked like it had a row for displaying the albums but nothing showed at all.
On the Facebook end once you have accepted the app there seems to be no way at all of backtracking to check that the URL is correct. Even “removing the application” and trying again jumps you straight to the empty page.
I could not get this app to work either. I got the following error.
Parse error: syntax error, unexpected ‘[‘ in /home1/correiac/public_html/gallery/zp-core/fbzen.php on line 26
The path looks to be correct. So, I don’t know what the issue is.