- 08/10/11 20:35:45 (4 years ago)
- 29 added
- 1 edited
r421081 r421835 1 test 1 === Social === 2 Contributors: crowdfavorite, alexkingorg 3 Tags: comments, facebook, twitter 4 Requires at least: 3.2 5 Tested up to: 3.2.1 6 Stable tag: 1.0 7 8 Broadcast posts to Twitter and/or Facebook, pull in items from each as comments, and allow commenters to use their Twitter/Facebook identities. 9 10 == Description == 11 12 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/). 13 14 **Broadcast Published Posts** 15 16 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. 17 18 - Automatically broadcast posts to Twitter and/or Facebook 19 - Supports multiple accounts associated per user and per blog 20 - Customize the broadcast message using tokens 21 22 **Pull in Tweets and Replies as Comments** 23 24 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. 25 26 - Automatically polls Twitter and Facebook for mentions of your post 27 - Displays mentions inline with comments 28 - Filter comments by originating source (Facebook, Twitter, or your blog as comments) 29 - Allow users to reply to the offsite responses 30 31 **Comment as Facebook and/or Twitter Identity** 32 33 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. 34 35 - Allow users to leave comments as Facebook or Twitter identity 36 - Twitter hovercard support (with @anywhere API key) 37 - Links point back to users' Facebook or Twitter profiles 38 - Indicators let you and visitors know people are who they say they are 39 40 == Installation == 41 42 1. Upload `social` to the `/wp-content/plugins/` directory or install it from the Plugin uploader 43 2. Activate the plugin through the `Plugins` menu in the WordPress administrator dashboard 44 3. Visit your profile page under `Users > Profile` to associate Twitter and Facebook accounts with your profile 45 4. Visit the settings page under `Settings > Social` to associate Twitter and Facebook accounts with your blog 46 5. Change your plugin directory or uploads writable to allow the cron jobs to fetch new comments from Twitter and Facebook 47 6. Register for and add your [Twitter @anywhere API key](http://dev.twitter.com/anywhere) to the settings page to enable Twitter hovercards 48 49 == Frequently Asked Questions == 50 51 = Who created this plugin? = 52 53 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"). 54 55 = How can I customize the comments form in my theme? = 56 57 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: 58 59 - `.social-comment-header `- contains the author information, avatar, and meta information 60 - `.social-comment-inner` - a wrapper for the actual comment content, allowing more freedom with comment styling. 61 - `.social-comment-body` - the container for the comment content. 62 - `.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. 63 - `.social-post-form` - where the comment form controls reside. Use this hook to customize the look of form inputs and labels. 64 - `#facebook_signin` - style the link that activates Facebook oAuthorization 65 - `#twitter_signin` - style the link that activates Facebook oAuthorization 66 - `.social-quiet` - a muted typography style, for subdued display of text 67 - `.bypostauthor` - a class added to the comment thread to style comments from the author of the post 68 69 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 70 71 Note: we do not recommend making changes to the included plugin files as they may be overwritten during an upgrade. 72 73 = Can I define a custom comments.php for Social? = 74 75 Yes, if you'd rather create more 'advanced' customizations beyond CSS tweaks simply add the following line to your theme's `functions.php` file: 76 77 define('SOCIAL_COMMENTS_FILE', STYLESHEETPATH.'/social-comments.php'); 78 79 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. 80 81 = How can I define custom JS and/or CSS, or disable Social's JS/CSS? = 82 83 There are three constants that can be altered to your liking: 84 85 1. `SOCIAL_ADMIN_CSS` - CSS file for WP-Admin. 86 2. `SOCIAL_ADMIN_JS` - JS file for WP-Admin. 87 3. `SOCIAL_COMMENTS_CSS` - CSS file for the comments form. 88 4. `SOCIAL_COMMENTS_JS` - JS file used on the comments form and WP-Admin 89 90 To define custom JS/CSS in your theme's functions.php add the following line (Replace `SOCIAL_ADMIN_CSS` with one of the 91 constants listed above): 92 93 define('SOCIAL_ADMIN_CSS', STYLESHEETPATH.'/path/to/stylesheet.css'); 94 95 To disable Social's JS/CSS in your theme's functions.php add the following line (Replace `SOCIAL_ADMIN_CSS` With one of 96 the constants defined above): 97 98 define('SOCIAL_ADMIN_CSS', false); 99 100 = Why are the tabs on my comment form not displaying correctly? = 101 102 Chances are your theme is missing the `<?php wp_footer(); ?>` snippet in the footer.php. 103 104 = How often are comments aggregated from Facebook and Twitter? = 105 106 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. 107 108 These are performed using cron jobs noted below. 109 110 = How are comments aggregated from Facebook and Twitter? = 111 112 When the aggregation process runs Social uses the Facebook and Twitter search APIs to aggregate comments to the system. 113 114 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 uses the http://example.com?p=:id and the permalink generated by get_permalink($post_id) to search 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. 115 116 For Facebook, Social first uses the Facebook search API to find any post that has the http://example.com?p=:id or the permalink generated by wp_get_permalink($post_id). 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. 117 118 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. 119 120 = What tweets will be seen by the Twitter search during aggregation? = 121 122 Currently it seems Twitter will only return results using http://example.com/?p=:id and the permalink generated by get_permalink($post_id) if the full link is in the Tweet, or if the URL is minified using t.co URLs. Social can not guarantee that Tweets will be aggregated if any other URL shortening service is used. 123 124 = What CRON jobs are built into Social? = 125 126 Currently Social contains 2 CRON jobs: 127 128 1. `cron_15` 129 2. `cron_60` 130 131 = How can I override Social's internal CRON service with system CRON jobs? = 132 133 If you want to run system CRON jobs and disable Social's built in CRON jobs then do the following: 134 135 1. Go to Social's settings page. 136 2. Disable Social's internal CRON mechanism by selecting "Yes" under "Disable Internal CRON Mechanism" and clicking on "Save Settings". 137 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. 138 - An example system CRON could run `http://example.com/?social_cron=cron_15&api_key=your_api_key_here` 139 140 = How can I hook into a CRON for extra functionality? = 141 142 If you want to hook into a CRON for extra functionality for a service, all you have to do is add an action: 143 144 <?php add_action(Social::$prefix.'cron_15', array('Your_Class', 'your_method')); ?> 145 146 = How can I turn on and off Twitter's @Anywhere functionality? = 147 148 To utilize Twitter's @Anywhere functionality (hovercards appearing on linked @usernames) you will need to have an @Anywhere application set up. If you don't have an application already created, 149 visit http://dev.twitter.com/anywhere. 150 151 Once you have an Consumer API key, login to your WordPress installation and navigate to Settings -> Social -> Twitter @Anywhere Settings. Enter your `Consumer key` in the input box and click on "Save Settings". 152 153 If you want to disable the @Anywhere functionality, simply remove the API key from the Social settings page and click "Save Settings". 154 155 = Does the proxy application have access to my passwords now? = 156 157 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. 158 159 == Screenshots == 160 161 1. Allow your visitors to leave a comment as their Facebook or Twitter identities 162 163 2. Social settings screen to connect accounts, set up default broadcast settings and more 164 165 3. Post edit screen settings: broadcast the post, manually import comments, view a log of imported items 166 167 4. View of replies imported from Twitter as comments, @anywhere support 168 169 == Changelog == 170 171 = 1.0 = 172 * Initial release
Note: See TracChangeset for help on using the changeset viewer.