=== WPBook === Contributors: johneckman, davelester, BandonRandon Tags: facebook, platform, application, blog, mirror Stable tag: 2.2 Tested up to: 3.1 Requires at least: 2.9.0 Plugin to embed Wordpress Blog into Facebook Platform. As of 1.5, this plugin requires PHP 5. NOTE: Major changes between 2.0.x and versions 2.1 and greater. Please see: http://www.openparenthesis.org/2011/03/14/wpbook-2-1-released for information on how to upgrade if you used 2.0.x previously. == Description == WPBook enables users to add your (self-hosted, not wordpress.com) wordpress blog as a Facebook application. Facebook users will see your posts in a Facebook look and feel, and can leave comments with their Facebook identity. Comments are shared - meaning comments made by users on your blog at its regular domain and comments made by users inside Facebook are all shown to users of either "view" of your content. Facebook users can also add a profile tab to a Facebook page, using the "add profile tab" button at the top of the default canvas page. (NOTE: Facebook no longer allows the addition of tabs by applications to the Facebook profiles of individual users). WPBook also post notifications automatically to your wall, or the wall of pages for which you are an admin, to which you've added the app, and for which you've granted stream publish permission, when you write a new post. (This includes Application Profile pages and group walls, if you are an admin and have enabled fans to write on your walls). Finally, WPBook can also import comments made on your wall (or the wall of a Fan page) in response to excerpts it has posted, and show those in your WordPress blog as full comments. As of 1.5, this plugin requires PHP 5. == Installation == (Note: installation instructions: http://wpbook.net/docs/install/ ) 1. Copy the entire wpbook directory into your wordpress plugins folder, /wp-content/plugins/ You should have a directory structure like this: /wp-content/plugins/wpbook/wpbook.php /wp-content/plugins/wpbook/theme/ /wp-content/plugins/wpbook/client/ 2. Set up a New Application at http://www.facebook.com/developers/, obtaining a secret and API key. Set the callback url to your blog url, including a trailing slash. (http://www.yourblogurl.com/) For canvas url, you just need something *all lower case*, unique, with no spaces, and no trailing slash. Remember it. Set the application type to "website" Set the application to use an iFrame, not fbml, and to "resizable" (Using iFrames lets you use javascript, objects, and other tags not allowed in FBML inside blog posts) 3. Login to Wordpress Admin and activate the plugin 4. Using the WPBook menu, (Dashboard->Settings->WPBook) fill in the appropriate information including Facebook application secret and app ID, as well as your application canvas url. 5. (OPTIONAL) If you'd like, copy wpbook_theme into your wp-content/themes/ directory and customize the css, or edit the html directly in index.php. If this theme (named 'WPBook') is found installed, WPBook will use it rather than the built in theme. This theme will NOT be overwritten by updates unless you choose to copy it. == Frequently Asked Questions == = How do I edit the way my Facebook Application (mirrored blog) looks? = In the wpbook/theme directory, there is an index.php file. Most of what you want is there. There's also a default/style.css which basically mimics Facebook's styles, as well as some other files for processing comments and the like. == Changelog == = 2.2 = * Added the "Read More" action link. Because of a Facebook bug (http://bugs.developers.facebook.net/show_bug.cgi?id=15377) I can't add more than one action link to a post, so no "share" button. * Added posting options for Group walls, and comment import form Group walls * Limit the size of debug files created to 500k, for users who enable debugging and then forget. * Clean up DEBUG for cases where permissions fail or file is not writeable * Made "disable ssl verification" an option so that only users who need it will have it and others won't get conflict * Cleanup to the admin screens in general, more clarity around what is required and better language on the admin screens about what is being checked. (Thanks BandonRandon for patches) * Improved "Check permissions" page * Added wpbook logo which had been missing * Fix for get_themes() issues with WordPress 3.0.1 through 3.0.5 (Thanks BandonRandon for patch) = 2.1.4 = * Bugfix: Access token for importing comments from streams that aren't public * Bugfix: Get right Facebook avatar for comments made as pages = 2.1.3 = * Bugfix: Error for fopen filename can't be empty - wasn't declaring debug filename early enough in publish_to_facebook.php = 2.1.2 = * Bugfix: Don't store access_token in usermeta but in options table (Impacts users who were trying to post as authors other than admin) * Bugfix: Post Thumbnails was failing, resulting in random images * Bugfix: ssl options for self-signed certs (impacts posting to Facebook for users on servers with self-signed ssl certs) * Store separate access token and "manage_pages" permissions so that we can publish to pages as pages, not as users = 2.1.1 = * Bugfix - wrap call to get_the_post_thumbnail in function_exists() so that themes which don't support it don't break * If you are not using post thumbnails (because your theme doesn't support it, I can't use those thumbnails to post to the wall. = 2.1 = * Shifted from _GET and _POST to _REQUEST - to handle Facebook's changes which deprecated _GET * Released 2.1 = 2.1b2 = * Added wpbook_theme which can be copied to themes directory, enabling users to customize the theme without it getting overwritten (Thanks to Brook Dukes / BandonRandon for the patch) (copy the 'wpbook_theme' folder to 'wp-content/theme' and make any changes to this theme. To go back to the default theme delete the wpbook_theme or change the theme name in the stylesheet) * Cleaned up the "More Posts" section of the index.php template to not show when there is no previous or next page of posts * Added capability, based on a patch supplied by @sebaxtian, to allow user to post to FB as notes rather than wall excerpts = 2.1b1= * Changed to Facebook Graph API, PHP SDK * Posting to Profile Wall * Posting to Page, App, or Group Wall * OAuth authentication for Canvas * Upped minimum WordPress to 2.9.0 * Using "featured_image" thumbnails for posting to FB wall * Added Facebook Like button replacing "share" button * Points to external link * Updated comment import for new Graph API * Updated permissions checking page for storing access_token in user_meta = 2.0.13 = * Moved and Unhid the infinite_session_key in admin WPBook setting screen * Fixed attribution line function which prevented %author% from working * Added global gravatar setting - otherwise we only filter gravatars inside facebook. (This prevents wpbook from interfering with other gravatars in themes outside fb). * Added DONOTCACHEPAGE constant when pages are viewed inside facebook - this should enable WPBook to better coordinate with wp-super-cache. * Added initial support for iFrame based tabs - still needs work = 2.0.12 = * Fixed regression - cron was looking for FB client in wrong directory (Thanks Olivier) = 2.0.11 = * Removed "add to profile" tab options * README updates - link to instructions * Conditional checking for fb_page_target to avoid 'premature end of FQL query" * README updates on profile tabs * Add pending_to_publish state * Filter JS out of FB share link * Added more debugging info = 2.0.10 = * Changes by bandonrandon, see http://bandonrandon.wordpress.com/2010/10/10/wpbook-2-0-10-beta-release/ * Move includes into their own directory * Incorporate FB avatar in comments imported * New Admin Layout, images * Bug fixes: default for 'post to facebook' is set to true * Links in permissions page point to wpbook.net * FB tabs view moved to its own file in theme directory = 2.0.9.2 = * Typo in wpbook_cron.php (defin should be define) - triggered only when debug disabled * Added thead to allowed tags in tab view = 2.0.9.1 = * SVN issue - removing html entities from comment author = 2.0.9 = * Fixed the lost navigation issue - previous and next page of posts listed at bottom of archive pages (Though not on tabs) * %category_link% and %tab_link% in header/footer were broken - fixed. * Attempt at fix for comment authors with non-ascii characters in their names * Removing old profilebox code and references - Facebook no longer allows profile boxes - replaced by tabs * Excerpts posting to walls with [caption] shortcodes - fixed * Timestamp on imported comments - fixed * Added user_ID to comment-data array for comment import = 2.0.8.1 = * Ouch! Checked in version had extra whitespace before opening php tag * Array checking for page type should be cleaner = 2.0.8 = * Changed the "catch permissions" logic for retrieving the infinite session key again - hopefully eliminate conflict with theme-my-login plugin and any other plugin trying to set cookies. * Adapted logic to allow for posting to the walls of Application Profile pages, Group pages, and regular Fan Pages = 2.0.7 = * Added new way to grant permissions directly for a pageID entered into the wpbook settings interface. Should improve capability for folks looking to publish to a page for which they aren't necessarily an admin, but for which permissions can be granted * Removed instructions, replaced with pointer to online version (easier to keep updated, limit size of download) = 2.0.6 = * Misc bug fixes: gravatar strtolower, htmlspecialchars on blog titles, link to instructions wrong in admin, adding