WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Fan Box Cache
"Official" Help Forum for Facebook Fan Box Cache (85 posts)

  1. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    If any of you have issues / problems with Facebook Fan Box Cache, or if you would like to suggest a feature, please do so in this topic.

    Thanks,
    Don

    http://wordpress.org/extend/plugins/facebook-fan-box-cache/

  2. aaronprill
    Member
    Posted 3 years ago #

    Just wanted to say I'm loving it so far- page load times are great compared to the default like box facebook provides... Put on update 0.3b and it looks much better! Making a mental note to donate at some point... ;)

  3. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks Aaron! Glad you like it. FYI - I added a donate link just for you!

  4. aaronprill
    Member
    Posted 3 years ago #

    Hey Donald,

    I put on the latest version this morning, and look what's happening with the "Become a Fan" link on my homepage- http://hungerband.com/

    I haven't had time to dig through the plugin code, but do you have any idea why it's being generated as such: "http://hungerband.com/target=_blank" instead of where the graphic properly links to (which is): "http://www.facebook.com/hungerband"

    Let me know-
    Thanks,
    Aaron

  5. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    Well, that's embarrassing. :)

    Apparently, I didn't account for fan pages that didn't have /pages/ in the url.

    Your page, being http://www.facebook.com/hungarband, didn't match my regex looking for facebook.com/pages/*/*.

    I've updated it, and it should now work out for you. If you update to 1.1 when it comes out, it'll work fine.

    If you don't want to wait until the release is approved, you can fix the regex yourself. In the _parseHTML function, change
    $urlExp = '/"http:\/\/www.facebook.com\/pages\/(.*?)\/(.*?)"/';
    to
    $urlExp = '/<div class="connect_top clearfix"><a href="(.*?)" target="_blank">/';

    Also change $this->_url = $url[0]; to $this->_url = $url[1];

    Sorry about that. I'll get the fix pushed live asap.

  6. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    oops - you'll also have to change a couple other lines, adding double quotes around $vars['url'] in two places. Probably better to just wait unless your comfortable with doing that.

  7. aaronprill
    Member
    Posted 3 years ago #

    That makes sense because I just updated to a custom Page domain last night. I thought it had to do with your update, but it had to do with that I guess... (Facebook allows custom page domains after you get 25 fans or more, btw).

    I am pretty comfortable editing php, but I'll wait for the official update... no big rush.

    Thanks again- glad I could help find a bug!
    Aaron

  8. peteratomic
    Member
    Posted 3 years ago #

    Excellent! THRILLED to finally find a FB fanbox plugin that works with Display Widgets so that I can control what pages the box appears.

    Just a small problem. I've got the number of connections set to 8 but only 6 are showing up. Could it have to do with some randomization issue? I've currently only got 9 fans listed so far (just create the page last night) so there aren't a lot to pull from.

    Ideas?

  9. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    @peteratomic - glad you like it. That was one of the problems I was facing and one of the reasons I created it.

    Your issue could be the size of your div container for the fanbox being set too small. Check the HTML and count the actual number of connections it's showing. (I use http://www.getfirebug.com and Firefox for that sort of stuff.)

    What's your site? I could take a look when I get a chance.

  10. peteratomic
    Member
    Posted 3 years ago #

    http://www.atomicdesignstudios.com/blog/clients/

    It looks like one more person "liked" the page, so now there are seven people filling eight potential slots. (Yesterday it was six filling eight potential slots.)

    That's why I thought there might be a bug with the randomization or something.

    Thanks for the quick reply!

  11. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    Weird...

    I went ahead and "liked" your page, and now I'm in there, rounding out the 8. Interesting. Being that I get the original iframe via cURL, and then just regex over it to get the info out that I need, there's really only two options:

    1. Facebook limits the number of fans that can be shown in a fanbox for pages that have less than X. (somewhat unlikely)

    2. A problem with my regex that reveals itself when used on a fan page that has less than X. (highly likely)

    Let me look into it.

  12. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    So, I looked into it, and it's actually a problem with facebook.

    If you look at your regular iframe fanbox url ( http://www.facebook.com/plugins/fan.php?connections=8&id=170388796337902&locale=en_US&stream=false&width=255 ) you'll see what I mean.

    Notice how the URL says to show 8 and the fanbox only shows 7? Apparently, there's a limit on facebook's side that causes this. Sorry it wasn't something I did, then there's the potential that I could fix it. But not this. :(

  13. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    I went ahead and "liked" your page again, so it shows the 8 on your site. :) (yay - I CAN do something!)

  14. peteratomic
    Member
    Posted 3 years ago #

    what? bugs in the most popular internet service in the world? I can't believe it! (when will we ever have sarcasm in text... I long for the day)

    thanks Mr Grape for the excellent customer support. I sincerely hope to make a fat donation, as soon as I pay my server bill!

  15. hnaparst
    Member
    Posted 3 years ago #

    I am trying to use the widget. What is the Fanbox ID?

  16. jackfuture
    Member
    Posted 3 years ago #

    Hi Donald,

    I really like the idea of this plugin. But I place great value on a well-looking layout. I'm sorry to say that your plugin looks quite boring.

    I'd love, if you implement a more facebook-like layout (like this plugin: http://wordpress.org/extend/plugins/wp-fb-fan-box/).

    Thanks,
    Jakob

  17. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    @hnaparst - Your Fanbox ID can be found in your Facebook fanpage url. It is the part after /pages/PAGE-NAME/###########/ . Those numbers are your ID. If you are using a custom page name for you page, then I don't have an "easy" way to get it for you. However, I am working on a tool that will take care of it for you, and will implement it soon.

    @jackfuture - That's precisely why I coded it the way I did. I made it as plane-jane as possible and even added the option to disable all inline CSS so that people concerned with the way it looks can put in their own styling via style.css. However, if the need is great, I'll consider adding the ability for "themes" selection in the admin panel. With options like "Facebook Style", "Clean & Crisp", or "Blank Slate"

  18. jackfuture
    Member
    Posted 3 years ago #

    @Donald: Thanks for your reply.
    OK, I didn't know the possibilities resulting from the option disabling inline CSS. But not everybody is an expert in CSS-coding, so this theme-option would be really great! :) It will be definitely the best facebook fanbox widget then.

  19. darrencoen
    Member
    Posted 3 years ago #

    hi donald, i get this error trying to activate:

    -------------
    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/B/2/8/B2885796/html/wp/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php on line 128
    -------------

    the server is running PHP Version 4.4.9

  20. darrencoen
    Member
    Posted 3 years ago #

    blah sorry... just saw this in the readme.
    "This plugin requires PHP5 and cURL to be enabled on your server."

  21. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    Exactly what I was going to point out. The reason I did this is because WP 3.1+ is going to be PHP5+ only.

  22. christianslater
    Member
    Posted 3 years ago #

    Hey, this plugin is the best idea I've ever seen regarding to the really annoying loading times of the fanbox... UNfortunately it doesn't work for me :(

    I get this error on my page when I activate the widget:

    Warning: file_put_contents(/###/#####/#####/wp-content/plugins/facebook-fan-box-cache/cache/fanbox.tmp.html) [function.file-put-contents]: failed to open stream: Permission denied in /###/#####/#####/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php on line 175
    
    Warning: file_put_contents(/###/#####/#####/wp-content/plugins/facebook-fan-box-cache/cache/fb_fanbox_cache_2111175171316.html) [function.file-put-contents]: failed to open stream: Permission denied in /###/#####/#####/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php on line 288
    
    Warning: file_get_contents(/###/#####/#####//wp-content/plugins/facebook-fan-box-cache/cache/fb_fanbox_cache_2111175171316.html) [function.file-get-contents]: failed to open stream: No such file or directory in /###/#####/#####/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php on line 153

    how come? I really would love to use this!

  23. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    @christianslater - that usually means that PHP isn't running under the same account as the hosting account, or for some other reason doesn't have sufficient privileges to use that cache directory.

    This can be easily solved by accessing your account via FTP and changing the permissions on the cache folder to 777, thus allowing PHP permission to write to it and read from it.

    If you aren't able to access and change permissions via FTP, you could possibly request your web host to "allow PHP to write to the /###/#####/#####/wp-content/plugins/facebook-fan-box-cache/cache/" directory.

  24. christianslater
    Member
    Posted 3 years ago #

    Hey Donald, thank you for your quick reply. I changed the permission of the cache Folder to 777 but then I get this error on my front homepage:
    Fatal error: Uncaught exception 'Exception' with message '22: The requested URL returned error: 404' in /###/#####/#######/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php:170 Stack trace: #0 /###/#####/#######/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php(143): EE_FB_Fanbox_Cache->_getHTML() #1 /###/#####/#######/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php(120): EE_FB_Fanbox_Cache->__construct('', '', '', '', NULL) #2 /###/#####/#######/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php(313): ee_fb_shortcode() #3 /###/#####/#######/wp-includes/widgets.php(182): EE_FB_Fanbox_Cache_Widget->widget(Array) #4 /###/#####/#######/wp-includes/widgets.php(891): WP_Widget->display_callback(Array, Array) #5 /###/#####/#######/wp-content/themes/avid2011/template-home.php(58): dynamic_sidebar() #6 /###/#####/#######/wp-includes/template-loader.php(43): include('/www/htdocs/v07...') #7 /###/#####/#######/wp-blog-header.php(16): require_once( in /###/#####/#######/wp-content/plugins/facebook-fan-box-cache/facebook-fan-box-cache.php on line 170

  25. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    That means that cURL is not able to access the URL of the fan page iframe. It throws the error when $this->_html is empty or false. Do you have a custom URL for you fan page? Are you sure that you entered the ID correctly?

  26. chrissss
    Member
    Posted 3 years ago #

    Is there a way to help you with translations? I could help you with german.

    Btw, for those of you who have problems to get their facebook page id, because they've got a fanity url like http://facebook.com/whatever. Just open your page and look for the profile picture. The url to the picture will look like this...

    http://profile.xxx/xxx/161999_182395928443149_1010918_n.jpg

    ...the 15 digit long number - in this case 182395928443149 - is the page id.

  27. Jurg3n
    Member
    Posted 3 years ago #

    I really like what i see and hear. Unfortunately it doesn't work on my site, i just see the title of my widget. its is just a white space.

    What am i doing wrong?

  28. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    @chrissss - Danke! I knew that this would come up when the plugin got popular, but I'm sorry to admit that I don't have anything in place for language translation. I want to for sure, but I don't know where to start. Can you point me in the right direction? (I'll start searching the Codex.)

    Also, thanks for pointing out an easy way to find the page id for users you can't. I have another regex created that will search page source for the id, but I don't have it implemented yet. Maybe version 2.0 with IDFinder and Translations is in order?

    @Jurg3n - what version of the plugin are you using?

  29. Jurg3n
    Member
    Posted 3 years ago #

    I am using Version: 1.3.1 and wordpress 3.04

    But i think i have solved my first problem, i try to make it work locally witch doesn`t work when i try it online i got it to work.
    now i've got a next question i would like to show the latest couple of posts from my stream is this possible? and how?

  30. Donald Gilbert
    Member
    Plugin Author

    Posted 3 years ago #

    @Jurg3n - I don't have streams enabled at this point. Although it is on the hitlist for version 2.0.

    Here's the fully partial list: ( <- Not a typo :] )
    1. Themes
    2. Facebook IDFinder
    3. Translations
    4. Streams

    If there's anything that anyone would like to see in v2.0, let me know. Feature requests are always welcome.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic