web/wp-content/plugins/social/README.txt
changeset 196 5e8dcbe22c24
equal deleted inserted replaced
195:c7c0fbc09788 196:5e8dcbe22c24
       
     1 === Social ===
       
     2 Contributors: crowdfavorite, alexkingorg
       
     3 Tags: comments, facebook, twitter, social, broadcast, import, integrate, integration
       
     4 Requires at least: 3.3
       
     5 Tested up to: 3.4.2
       
     6 Stable tag: 2.6
       
     7 License: GPLv2
       
     8 License URI: http://www.gnu.org/licenses/gpl-2.0.html
       
     9 
       
    10 Broadcast posts to Twitter and/or Facebook, pull in reactions from each (replies, retweets, comments, "likes") as comments, and allow commenters to log in with their Twitter/Facebook identities.
       
    11 
       
    12 == Description ==
       
    13 
       
    14 Brought to you by [MailChimp](http://mailchimp.com/), [Social](http://mailchimp.com/social-plugin-for-wordpress/) is a lightweight plugin that handles a lot of the heavy lifting of making your blog seamlessly integrate with social networking sites [Twitter](http://twitter.com/) and [Facebook](http://facebook.com/).
       
    15 
       
    16 **Broadcast Published Posts**
       
    17 
       
    18 Through use of a proxy application, you can associate your Twitter and Facebook accounts with your blog and its users. Once you publish a new post, you can then choose to automatically broadcast a message to any accounts authenticated with the overall blog or your current logged-in user.
       
    19 
       
    20 - Automatically broadcast posts to Twitter and/or Facebook
       
    21 - Supports multiple accounts associated per user and per blog
       
    22 - Customize the broadcast message using tokens
       
    23 
       
    24 **Pull in Tweets and Replies as Comments**
       
    25 
       
    26 When publishing to Facebook and Twitter, the discussion is likely to continue there. Through Social, we can aggregate the various mentions, retweets, @replies, comments and responses and republish them as WordPress comments.
       
    27 
       
    28 - Automatically polls Twitter and Facebook for mentions of your post
       
    29 - Displays mentions inline with comments
       
    30 - Filter comments by originating source (Facebook, Twitter, or your blog as comments)
       
    31 - Allow users to reply to the offsite responses
       
    32 
       
    33 **Comment as Facebook and/or Twitter Identity**
       
    34 
       
    35 Many individuals use Facebook or Twitter as their primary identity(ies) on the web. Allow your commenters to log in and leave a comment as that identity. Furthermore, they can publish their response directly to their Twitter or Facebook account.
       
    36 
       
    37 - Allow users to leave comments as Facebook or Twitter identity
       
    38 - Links point back to users' Facebook or Twitter profiles
       
    39 - Indicators let you and visitors know people are who they say they are
       
    40 
       
    41 **Developers**
       
    42 
       
    43 Please [fork, contribute and file technical bugs on GitHub](https://github.com/crowdfavorite/wp-social).
       
    44 
       
    45 == Installation ==
       
    46 
       
    47 1. Upload `social` to the `/wp-content/plugins/` directory or install it from the Plugin uploader
       
    48 2. Activate the plugin through the `Plugins` menu in the WordPress administrator dashboard
       
    49 3. Visit the settings page under `Settings > Social` to add Twitter and Facebook accounts for all authors on your site
       
    50 4. Visit your profile page under `Users > Profile` to add Twitter and Facebook accounts that only you can broadcast to
       
    51 5. Make sure your plugin or uploads directory writable to allow the cron jobs to fetch new comments from Twitter and Facebook
       
    52 
       
    53 == Frequently Asked Questions ==
       
    54 
       
    55 = Who created this plugin? =
       
    56 
       
    57 Social was conceptualized and co-designed by the fine folks at [MailChimp](http://mailchimp.com "Email Marketing from MailChimp") led by [Aarron Walter](http://aarronwalter.com/). The application proxy is maintained and hosted by [MailChimp](http://mailchimp.com) and the plugin was co-designed and developed by [Crowd Favorite](http://crowdfavorite.com/ "Custom WordPress and web development").
       
    58 
       
    59 = How can I customize the comments form in my theme? =
       
    60 
       
    61 We recommend using CSS styles to selectively change the look and feel of your comments and comment form. The classes `social-comments-[no-comments|wordpress|twitter|facebook|pingbacks]` are available as as class names. More specific classes include:
       
    62 
       
    63 - `.social-comment-header `- contains the author information, avatar, and meta information
       
    64 - `.social-comment-inner` - a wrapper for the actual comment content, allowing more freedom with comment styling.
       
    65 - `.social-comment-body` - the container for the comment content.
       
    66 - `.social-comment-collapsed` - use this hook to create a more compact version of a comment.  hide comment text, shrink the size of the avatar, etc.
       
    67 - `.social-post-form` - where the comment form controls reside.  Use this hook to customize the look of form inputs and labels.
       
    68 - `#facebook_signin` - style the link that activates Facebook oAuthorization
       
    69 - `#twitter_signin` - style the link that activates Facebook oAuthorization
       
    70 - `.social-quiet` - a muted typography style, for subdued display of text
       
    71 - `.bypostauthor` - a class added to the comment thread to style comments from the author of the post
       
    72 
       
    73 The icons used for the plugin are currently 16x16 pixels, and reside in a vertical sprite with each icon at 100px intervals.  Adhering to these intervals will ensure that icon positions will not need to change
       
    74 
       
    75 Note: we do not recommend making changes to the included plugin files as they may be overwritten during an upgrade.
       
    76 
       
    77 = Can I define a custom comments.php for Social? =
       
    78 
       
    79 Yes, if you'd rather create more 'advanced' customizations beyond CSS tweaks simply add the following line to your theme's `functions.php` file:
       
    80 
       
    81     define('SOCIAL_COMMENTS_FILE', STYLESHEETPATH.'/social-comments.php');
       
    82 
       
    83 Then you will need to create the `social-comments.php` file with your custom markup (perhaps copy it directly from the provided comments.php in the plugin) into your theme's directory.
       
    84 
       
    85 = How can I define custom JS and/or CSS, or disable Social's JS/CSS? =
       
    86 
       
    87 There are three constants that can be altered to your liking:
       
    88 
       
    89 1. `SOCIAL_ADMIN_CSS` - CSS file for WP-Admin.
       
    90 2. `SOCIAL_ADMIN_JS` - JS file for WP-Admin.
       
    91 3. `SOCIAL_COMMENTS_CSS` - CSS file for the comments form.
       
    92 4. `SOCIAL_COMMENTS_JS` - JS file used on the comments form and WP-Admin
       
    93 
       
    94 To define custom JS/CSS in your theme's functions.php add the following line (Replace `SOCIAL_ADMIN_CSS` with one of the
       
    95 constants listed above):
       
    96 
       
    97     define('SOCIAL_ADMIN_CSS', STYLESHEETPATH.'/path/to/stylesheet.css');
       
    98 
       
    99 To disable Social's JS/CSS in your theme's functions.php add the following line (Replace `SOCIAL_ADMIN_CSS` With one of
       
   100 the constants defined above):
       
   101 
       
   102     define('SOCIAL_ADMIN_CSS', false);
       
   103 
       
   104 = Why are the tabs on my comment form not displaying correctly? =
       
   105 
       
   106 Chances are your theme is missing the `<?php wp_footer(); ?>` snippet in the footer.php.
       
   107 
       
   108 = How often are comments aggregated from Facebook and Twitter? =
       
   109 
       
   110 Once a post has been broadcasted to Facebook and/or Twitter Social will attempt to aggregate comments every 2, 4, 8, 12, 24, 48, and every 24 hours after the 48 hour mark after being broadcasted. If the post was broadcasted more than 48 hours ago, and there have been no replies through Facebook and/or Twitter then aggregation for that post will stop.
       
   111 
       
   112 These are performed using cron jobs noted below.
       
   113 
       
   114 = How are comments aggregated from Facebook and Twitter? =
       
   115 
       
   116 When the aggregation process runs Social uses the Facebook and Twitter search APIs to aggregate comments to the system.
       
   117 
       
   118 For Twitter, Social first searches for retweets and mentions of the broadcasted tweet using the following API calls: /statuses/retweets/:id, /statuses/mentions. Social then stores those IDs in a collection of aggregated comments. Social then hits Twitter's search API and searches by URL for tweets that contain a link to the blog post. Social then iterates over the search results and adds them to the collection, if the tweet does not already exist in the collection.
       
   119 
       
   120 For Facebook, Social first uses the Facebook search API to find any post that has the http://example.com?p=:id, the permalink generated by get_permalink($post_id) or the short link generated by the active short link delegate at the time the post was created. These posts are then stored in a collection. Next, Social loads the comments for the broadcasted post by calling http://graph.facebook.com/:id/comments. Social then iterates over the search results and adds them to the collection, if the comment does not already exist in the collection.
       
   121 
       
   122 For both Facebook and Twitter, the final collection of tweets/comments are then added to the blog post as comments. The IDs of the tweets and comments are then stored to the database so when aggregation runs again the tweets and comments already aggregated are not duplicated.
       
   123 
       
   124 = What tweets will be seen by the Twitter search during aggregation? =
       
   125 
       
   126 Twitter converts most short URLs to longer URLs, so searches by the final URL will typically find all of the tweets you want. Social also explicitly searches by the short link for the post (using whatever short link generator or plugin was active when the post was broadcast).
       
   127 
       
   128 = What CRON jobs are built into Social? =
       
   129 
       
   130 Currently Social contains one CRON job, `cron_15`.
       
   131 
       
   132 = How can I override Social's internal CRON service with system CRON jobs? =
       
   133 
       
   134 If you want to run system CRON jobs and disable Social's built in CRON jobs then do the following:
       
   135 
       
   136 1. Go to Social's settings page.
       
   137 2. Disable Social's internal CRON mechanism by selecting "Yes" under "Disable Internal CRON Mechanism" and clicking on "Save Settings".
       
   138 3. Now you should have an API key that you'll find under "API Key" under "Disable Internal CRON Mechanism". Use this API key for the "api_key" parameter on the URL your system CRON fires.
       
   139 	- An example system CRON could run `http://example.com/?social_controller=cron&social_action=cron_15&api_key=your_api_key_here`
       
   140 
       
   141 = How can I hook into a CRON for extra functionality? =
       
   142 
       
   143 If you want to hook into a CRON for extra functionality for a service, all you have to do is add an action:
       
   144 
       
   145     <?php add_action('social_cron_15', array('Your_Class', 'your_method')); ?>
       
   146 
       
   147 = Does the proxy application have access to my passwords now? =
       
   148 
       
   149 No, the proxy acts just like any Twitter or Facebook application. We've simply pass commands back and forth through this application so you don't have to set up your own.
       
   150 
       
   151 = If a user comments using Twitter and that user has an existing local WordPress account, can they add the twitter account to the existing WordPress account? =
       
   152 
       
   153 Yes, they can add the account to their profile page.
       
   154 
       
   155 = Why are some custom posts with my blog post's URL not being found during aggregation? =
       
   156 
       
   157 This may be due to the bug with Facebook's search API. Currently, for a post to return on the search the URL must not be at the beginning of the post.
       
   158 
       
   159 Valid post that will be included:
       
   160 
       
   161 Hey, check out this post! http://example.com/?p=5
       
   162 
       
   163 Invalid post that will not included:
       
   164 
       
   165 http://example.com/?p=5 This was a cool post, go read it.
       
   166 
       
   167 Track this bug on Facebook: http://bugs.developers.facebook.net/show_bug.cgi?id=20611
       
   168 
       
   169 = Why are some of comments/posts not returning from Facebook right away? =
       
   170 
       
   171 We have noticed some latency around the inclusion of some items when querying the Graph API. We have seen some comments and posts take up to 72 hours to be included in aggregation requests.
       
   172 
       
   173 = Does your permalink have apostrophes in it? Is Social stripping these from the URL when disconnecting? =
       
   174 
       
   175 This is due to the fact that older versions of WordPress did not remove apostrophes from the permalink and newer versions of WordPress do. It is possible that your blog post was created on a version of WordPress that contained this bug. To fix this, simply login to your WP-Admin and edit the post by doing the following (assuming you're running WordPress 3.2+):
       
   176 
       
   177 1. Click on Posts in the WP-Admin menu.
       
   178 2. Find your post and click on "Edit".
       
   179 3. Under your post's title, click on the "Edit" link that is next to the permalink.
       
   180 4. Click "OK" to save the new permalink. (This will automatically remove the apostrophes for you.)
       
   181 
       
   182 = Can Social use Bit.ly, Bit.ly Pro or another URL shortener when broadcasting? =
       
   183 
       
   184 Social uses the core WordPress shortlink feature when broadcasting blog posts. Any plugin that interacts with the shortlink will also be reflected in Social's broadcasts.
       
   185 
       
   186 wp_get_shortlink Documentation: http://codex.wordpress.org/Function_Reference/wp_get_shortlink
       
   187 Bit.ly Plugin: http://wordpress.org/extend/plugins/bitly-shortlinks/
       
   188 
       
   189 When using the Bit.ly plugin, you will need to add the following to your wp-config.php to get it working:
       
   190 
       
   191     /**
       
   192      * Settings for Bit.ly Shortlinks Plugin
       
   193      * http://yoast.com/wordpress/bitly-shortlinks/
       
   194      **/
       
   195     define('BITLY_USERNAME', '<your username>');
       
   196     define('BITLY_APIKEY', '<your API key>');
       
   197 
       
   198     // optional, if you want to use j.mp instead of bit.ly URL's
       
   199     define('BITLY_JMP', true);
       
   200 
       
   201 
       
   202 = I have Apache's 401 auth enabled on my website, why is Social not working? =
       
   203 
       
   204 The proxy Social connects to requires your website to be publicly accessible to properly authorize your Facebook and Twitter accounts.
       
   205 
       
   206 = How can I be notified via email of comments left using Social? =
       
   207 
       
   208 You can install the "Subscribe to Comments Reloaded" plugin written by coolman (http://profiles.wordpress.org/users/coolmann/).
       
   209 
       
   210 Download: http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/
       
   211 
       
   212 = I occasionally receive a PHP notice of "Undefined property: WP_Http_Curl::$headers", what does this mean? =
       
   213 
       
   214 This is actually a bug in the WordPress core. This will be fixed in WordPress 3.3 according to this ticket http://core.trac.wordpress.org/ticket/18157.
       
   215 
       
   216 = Where can I update my default social broadcast accounts? =
       
   217 
       
   218 Connect your social account and after that you can add/remove your default broadcast accounts under the Social Settings Page and from your user profile page (Users/Your Profile).
       
   219 
       
   220 = Why can't I set up my social accounts on my local WordPress site? =
       
   221 
       
   222 Accounts can not be authorized on local environments, unless your local environment is publicly accessible via DNS.
       
   223 
       
   224 = I previously used a custom comments.php template with Social and it no longer works when I upgrade to 2.0, why is this? =
       
   225 
       
   226 This is because we completely refactored Social's codebase for 2.0. Chances are your old comments template is using some code that we removed in 2.0. For now you should be able to use the built in Social comments template, but if you want to continue using your old template, we suggest you take a look at social/views/comments.php to see how the new implementation works.
       
   227 
       
   228 For a more in-depth look at what you need to be aware of when upgrading from 1.x to 2.0 please have a look at the wiki entry: https://github.com/crowdfavorite/wp-social/wiki/Upgrading-from-1.x-to-2.0
       
   229 
       
   230 = How do I include Facebook Likes and Twitter Retweets in my comments feed? =
       
   231 
       
   232 The following code should add "meta" comments such as Likes as Retweets to your comments RSS and Atom feeds:
       
   233 
       
   234 	function social_enable_meta_comments_in_feed() {
       
   235 		$social = Social::instance();
       
   236 		remove_filter('comment_feed_where', array($social, 'comments_feed_exclusions'));
       
   237 	}
       
   238 	add_action('init', 'social_enable_meta_comments_in_feed');
       
   239 
       
   240 = Does Social output Facebook Open Graph tags for my site? =
       
   241 
       
   242 No it does not. If you would like to have these tags on your site, please install one of the many available plugins that add this feature.
       
   243 
       
   244 = I have a lot of comments and loading the avatars makes the page load slowly, what can I do? =
       
   245 
       
   246 Social supports the [Lazy Load plugin](http://wordpress.org/extend/plugins/lazy-load/). Install this plugin and Social's avatars will hang out on the couch eating potato chips and watching TV until they are needed.
       
   247 
       
   248 == Screenshots ==
       
   249 
       
   250 1. Allow your visitors to leave a comment as their Facebook or Twitter identities
       
   251 
       
   252 2. Social settings screen to connect accounts, set up default broadcast settings and more
       
   253 
       
   254 3. Post edit screen settings: broadcast the post, manually import comments, view a log of imported items
       
   255 
       
   256 4. Send customized broadcasts to each social account 
       
   257 
       
   258 5. View of replies imported from Twitter as comments
       
   259 
       
   260 
       
   261 == Upgrade Notice ==
       
   262 
       
   263 = 2.6 =
       
   264 This version fixes numerous bugs, provides compatibility with the newest Twitter API, and provides a few new filters to customize the date output.  See the Changelog for details
       
   265 
       
   266 == Changelog ==
       
   267 
       
   268 = 2.6 =
       
   269 * Now utilizes the newest Twitter API (1.1)
       
   270 * Removed the discontinued Twitter @anywhere service
       
   271 * Automatically approve Likes and Retweets
       
   272 * New date format filters: `social_formatted_date`, `social_comment_date`, `social_fuzzy_date`
       
   273 * XML-RPC / posts via email / scheduled posts now auto broadcast correctly
       
   274 * Enable Pages support in user profile social accounts is working correctly
       
   275 * Now utilizing longer timeouts for broadcast requests
       
   276 * Properly post links to facebook
       
   277 * Remove 'social' namespace for login i18n
       
   278 * Properly truncate comment broadcasting, giving the url priority
       
   279 
       
   280 
       
   281 = 2.5 =
       
   282 * Fix race condition that could cause users to be authenticated as the wrong user when both requests happened simultaneously.
       
   283 * Improve Facebook posting (post links with comments and broadcasts, except for status posts)
       
   284 * Improve Social as a platform (can disable broadcasting, comment display, comment importing, "add an account" alert is dismissable)
       
   285 * Revise broadcasting screen to allow sending different messages to each account
       
   286 * Revise account management UI
       
   287 * Add a Manual Tweet Import field on the front-end (via admin bar)
       
   288 * Twitter search expanded to receive 100 results per request
       
   289 * Ability to reply to a tweet with a broadcast
       
   290 * Import replies via Twitter to broadcasted comments (if found)
       
   291 * Automatically select proper social account when replying to a comment
       
   292 * When posting a comment back to Facebook, attempt to reply in an existing comment thread where appropriate
       
   293 * Automatically check the "broadcast" box when replying to a social comment and authenticated as a user on the same social network
       
   294 * Don't include Retweet and Like comments in comment RSS/Atom feeds
       
   295 * Improved relative date functions for comments (3 months ago, etc.)
       
   296 * Support lazy loading of avatars (via plugin)
       
   297 * Change comment header title based on context (creating a new comment, replying to a comment, etc.)
       
   298 * Fix issue causing reactions to Facebook broadcasts to not be imported consistently as comments
       
   299 * Various bug fixes and improvements
       
   300 
       
   301 
       
   302 = 2.0.1 =
       
   303 * Localization fixes (props thomasclausen)
       
   304 * Minor bug fixes
       
   305 
       
   306 = 2.0 =
       
   307 * Complete re-write for improved reliability and ease of future expansion.
       
   308 * Enables broadcasting to Facebook Pages.
       
   309 * Facebook Likes are now imported during comment aggregation.
       
   310 * Twitter retweets and Facebook Likes have more compact visual presentation.
       
   311 * Smart detection of retweets as understood by humans (where possible).
       
   312 * Enable broadcasting to selected by default.
       
   313 * Future posts are not broadcast until they are published.
       
   314 * Comments are not broadcast until they are approved.
       
   315 * Directly imported tweets (by URL) are approved immediately (not held for moderation).
       
   316 * Only public tweets are imported as comments.
       
   317 * New authentication scheme improves security.
       
   318 * Manual comment check commands from the admin bar and posts list admin page.
       
   319 * Improved queue and locking system to reduce the possibility of social reactions being imported twice.
       
   320 * Filter: social_broadcast_format now contains a third parameter, $service_key.
       
   321 * Filter: social_broadcast_permalink now contains a third parameter, $service_key.
       
   322 * Filter: social_format_content now contains a fourth parameter, $service_key.
       
   323 * Filter: social_broadcast_content_formatted now contains a third parameter, $service_key.
       
   324 
       
   325 = 1.0.2 =
       
   326 * Added the social_kses method to cleanse data coming back from the services.
       
   327 * WP accounts are no longer created with usernames of "facebook_" and "twitter_".
       
   328 
       
   329 = 1.0.1 =
       
   330 * Automatic CRON jobs now run correctly.
       
   331 * Facebook replies to broadcasted posts are now aggregated.
       
   332 * Miscellaneous bug fixes.
       
   333 
       
   334 = 1.0 =
       
   335 * Initial release