WordPress with Bridgy

From IndieWeb
(Redirected from wordpress bridgy)


WordPress with Bridgy is a work-in-progress guide for how to setup your WordPress blog to work with Bridgy to both backfeed (have social media likes, replies, reposts show up on your original posts) and POSSE (cross-post your posts to social media) .

If you're unsure what Bridgy is please take a moment to review the main Bridgy page.

This page is under a lot of construction.

Below we'll detail some of the requirements for setting up Bridgy to work with your self-hosted WordPress.com website. If you have questions/comments, please stop by in chat/IRC for assistance.

The IndieWebCamp pop-up session Getting Started with WordPress covers some of of this related set up and configuration.

Overview of Bridgy's functionality

Bridgy is a "magical" IndieWeb project built by Ryan Barrett, Kyle Mahan, and others and will help you to do two primary functions with your WordPress blog:

  1. backfeed (or pulling back responses) - Bridgy connects silo services (presently Facebook, Twitter, Google+, Instagram, Flickr and Mastodon) using their open APIs to add webmention support (at least until they choose to support them directly). This essentially means that likes, replies, and reposts from these services will be sent back as comments to your original post on your site.
  2. syndication/publication via POSSE - Bridgy allows you to leverage your site's ability to send webmentions to trigger Bridgy to syndicate copies of your content to various silos like Twitter, Facebook and Flickr. (Sadly Google+ and Instagram don't allow publishing through their API).

These two functionalities are independent, so one can be used without necessarily configuring or using the other. The larger majority of people will probably be interested in backfeed functionality and may not need/use the syndication functionality, or may choose to use alternate methods of syndication (JetPack, SNAP, others).

By itself, Bridgy doesn't do much--one might consider it a "translation tool" in a sense for talking to the social media silos. Bridgy is a third party application that allows a large group of individuals, programs, and CMSs to easily interact with the social silos it supports without requiring a much larger overhead (or development tax) of requiring each developer to set up and maintain codebase and APIs for each of these services individually.

Prerequisites

Prior to beginning to set up Bridgy, know that it relies on some prior set up or installed plugins to allow you to easily interact with it. For the sake of the details below, we'll presume you've got the IndieWeb WordPress plugin installed with the following minimal set of sub-plugins installed:

  • Webmention plugin - Bridgy will send your site comments/likes/interactions as comments using webmention; your site can also send webmentions to Bridgy's endpoint to allow you to use Bridgy Publish to publish on your behalf. (no configuration required beyond installing and activation)
  • Semantic Linkbacks - Generates richer WordPress comments (no configuration required beyond installing and activation)
  • Syndication Links - Allows you to link to copies of your posts elsewhere; Bridgy uses the URLs input into this field to properly parse your webpages to ensure the comments/likes are being sent to the correct page. Minimal configuraton beyond installation/activation; most additional options dictate options for how the URLs are displayed on your page. It also can trigger Bridgy to publish posts to silos.
    • Technically one can get away without this plugin, but it would require additional knowledge and some onerous (annoying?) handcoded HTML which isn't recommended
  • WebMention support for (threaded) comments (technically not required, but recommended; requires no configuration) NOTE: This plugin was merged into the WebMention plugin in April, 2018.

For additional details and help with this portion, see also Getting_Started_on_WordPress and WordPress/Plugins. Additional plugins within the IndieWeb suite can also be installed, but they won't have a direct effect with regard to Bridgy functionality.

Backfeed

Connecting Social Services to Bridgy

Bridgy attempts to be as helpful as possible in the set up process, so if you've got something missing or not configured properly, it will typically tell you what is wrong and include links and documentation for fixing them.

Below, we'll walk through the set up of connecting Bridgy to one's Twitter account as an example with the presumption that setting up the other services (Facebook, Google+, Instagram, and Flicker) are entirely similar. Those with additional subtleties will be indicated below.

Nota bene: On Brid.gy self-hosted WordPress(.org) users will activate the social silos they're interested in connecting. They should not click on the WordPress.COM Brid.gy button as that is meant for those using the hosted version of WordPress on WordPress.com.

Rel-me links

Bridgy will look at both your website and the social silo you're setting up to make sure that there are rel-me links on each one pointing back at the other. (If you haven't already configured the IndieWeb Plugin, be sure to go back and do that.) Most social services have a URL field for your website that is automatically wrapped with a rel="me", so one only needs to input the URL in the settings page (Twitter works this way for example). Bridgy imputes a "virtual" rel-me on those without an explicit rel-me tag by virtue of specific fields which expect a user's website to be input (Facebook and Instagram work this way).

Because Facebook and Instagram don't natively support rel-me, one needs to put one's personal website URL into (the logical) place for Bridgy to find it. * On Facebook, from your personal profile page (https://facebook.com/username), click the "About" tab, then click "Contact and Basic Info" to be able to put your URL into the Website box listed under "Websites and Social Links". Note that you can add additional URLs to support more than one site if desired.

  • On Instagram, from your profile page, click on "Edit Profile" and add the URL to the "Website" field. If one wants to support more than one site, one can add an additional URL to the "Bio" field as well.

OAuth and IndieAuth

You're now ready to begin setting up Bridgy to interact with the silos.

From the Brid.gy home page, click on the Twitter button to initiate the authentication to Twitter. If you're not signed into Twitter, do so on the resultant page. Otherwise, or next, click "Authorize App" which will redirect you back to your Twitter account page on Brid.gy.

  • Need to include instructions here for IndieAuth for Instagram which doesn't support OAuth

Managing Backfeed

With your Twitter account authenticated you should now be set up for backfeed and will begin receiving webmentions from Bridgy because Bridgy defaults to this setting as indicated in the middle of the page by the phrase "Listening for responses."

(If you ever want to turn off backfeed, you can click the "Disable" button under "Listening for responses.")

If you have blog posts you've syndicated to Twitter with backlinks on them, in a minute or two you should see the comments, likes and retweets from those in the pending comments section of the administrative interface of your WordPress blog. If you moderate comments in WordPress, you can then approve, spam, or trash them as necessary.

If you haven't pre-configured any of the steps above properly, Bridgy should give you an error message with instructions and possible links for fixing the error. Once reconfigured, try re-connecting/re-authenticating with the service.

Bridgy will work automatically at intervals to perform backfeed for your site. If you believe it isn't working for some reason or would like to trigger it automatically you can do one of the two following operations from any of the service specific pages for your accounts:

  • Crawl Now - You can click the "Crawl Now" button to have Brid.gy crawl your website looking for posts to which it can send responses. Bridgy will then automatically continue to crawl your pages looking for new posts at specified intervals.
  • Poll Now - Click this button to poll Twitter for new tweets on your accounts to send webmentions to your website(s).
  • <link> snippet if one's feed/blog aren't their front page, especially for Instagram

Rel-syndication links

Bridgy will look for u-syndication on your posts as an indicator of where they were syndicated. This allows Bridgy to know which post to send the appropriate webmentions to so that they appear as comments on the proper pages.

The simplest method for including u-syndication links is by using the aforementioned Syndication Links Plugin. While it has support for several POSSE plugins, one can manually add the permalinks to POSSE copies into the syndication box. They'll automatically be wrapped in the correct microformats for Bridgy to be able to find them.

One could also manually include the microformats and URLs in raw HTML on their pages, but this can be time consuming. Details for doing this can be found at https://brid.gy/about#link

Spam

Webmentions on WordPress can often be caught in either moderation or, if Akismet is enabled, in one's spam folder. Presently there haven't been any reported instances of webmention spam. For those who would prefer to automatically mark all incoming webmentions explicity as not spam, you can add the following code snippet to your functions.php file in your theme (or preferably child theme).

/* functions.php code to accept all webmentions as not spam
 * as suggested by snarfed at https://github.com/indieweb/wordpress-indieweb/issues/38
 */
function unspam_webmentions($approved, $commentdata) {
  return ($commentdata['comment_type'] == 'webmention' ||
	  get_comment_meta($commentdata['comment_ID'], 'semantic_linkbacks_type', true)
	  ) ? 1 : $approved;
}
add_filter('pre_comment_approved', 'unspam_webmentions', '99', 2);

As an additional/alternate measure, gRegor Morrill has created a WordPress filter to approve webmentions from previously-approved domains. Its code can be placed in one's functions.php file in their WordPress Theme to get it to work properly.


Brainstorming

Additional pieces this page could expand upon:

Set up for Publishing

With the basic set up for a Bridgy service taken care of (see above), one only need to click the social media button next to the text "Click to enable publishing" on the right hand side of the middle of the page. This will initiate an OAuth handshake to the intended service, so authorize the Bridgy app. Once you've been returned to Bridgy you're ready to go.

To test the publication functionality, one can put a URL from a post on their site into the URL box (labeled "Enter post URL") for that Bridgy service and click "preview" to see what the post will potentially look like. The appearance of the post will depend on your theme and the microformats on the page. Images within the post (or from the theme which are also included on the page) with the u-photo microformat will appear in the post along with the title of the post. If your test preview post doesn't look as you expect it, you may need to modify the markup either on the post itself, or within the theme.

A frequent error is that an author avatar on a page will have u-photo mark up without being enclosed in an h-card microformat. Modifying your theme's markup properly is necessary to achieve the results you want in properly syndicating your content using Bridgy publish functionality. The tool Indiewebify.me may help you in achieving the appropriate theme markup.

With Bridgy now set up, one could potentially manually publish all of their POSSE posts from the Bridgy interface for a particular service, but automated means will be described below.

Manual POSSE to Bridgy using HTML markup

Outline for material to come:

POSSE to Bridgy using Syndication Links

Main article: Syndication Links

While it can be instructive to hand code HTML to publish through Bridgy, it can be very time consuming. Toward that end David Shanske has added additional automation functionality to the Syndication Links plugin.

In addition to displaying links to syndicated copies of content (see backfeed section above), the plugin also adds a meta-box with a simple checkbox interface in the sidebar of the WordPress post editor for indicating where to send POSSE copies of one's post. To configure available syndication endpoints, go to the Syndication Links settings in your WordPress admin (at /wp-admin/admin.php?page=syndication_links) to configure them.

The plugin supports Bridgy Publish via Webmention. After sending a webmention to Bridgy to publish your post on your behalf, the Syndication Links plugin will automatically discover and save the URL of the POSSEd copy.

It also supports the newer Bridgy Publish via Micropub, which requires a token to be saved in settings that can be retrieved from your Bridgy user page. If publishing using Micropub, then the plugin will convert WordPress properties to send to Bridgy, whereas with Webmention, Bridgy will try to parse them out of the page. If you have issues with your theme being microformats compliant, Micropub would be the preferable option.

POSSE to Bridgy using Bridgy Publish Plugin

Nota Bene: While you may find it in the repository and it may still work, the Bridgy for WordPress plugin has been deprecated in favor of the Syndication Links plugin which is now recommended (see just above).

Bridgy with WordPress.com

  • Details and caveats for using Bridgy
  • manual publishing since WordPress.com doesn't support plugins
    • suggestions for alternate methods (JetPack)


WordPress
Topics Getting Started on WordPress β€’ Advanced WordPress Set Up β€’ Plugins β€’ Themes β€’ Examples β€’ WordPress with Bridgy β€’ Development β€’ Data β€’ Security
Primary Plugins Indieweb Plugin β€’ Webmention β€’ Semantic Linkbacks β€’ Micropub β€’ IndieAuth β€’ Post Kinds β€’ Syndication Links β€’ WebSub plugins
POSSE Plugins Syndication Links β€’ Social Network Auto Poster β€’ JetPack Publicize β€’ WP Crosspost β€’ Tumblr Crosspostr β€’ Diasposter β€’ Mastodon Autopost β€’ Bridgy Publish plugin (deprecated) β€’ Medium (deprecated)
PESOS Plugins Keyring Social Importers β€’ DsgnWrks Twitter Importer β€’ DsgnWrks Instagram Importer
Other Plugins IndieBlocks β€’ Shortnotes β€’ ActivityPub Plugin β€’ Aperture β€’ Refback plugin β€’ IndieWeb Press This β€’ WordPress MF2 Feeds Plugin β€’ WordPress uf2 β€’ OpenID β€’ Simple Location β€’ Parse This β€’ Indieweb Actions β€’ PressForward β€’ Yarns Indie Reader β€’ WhisperFollow β€’ blogroll2email
Themes SemPress β€’ (SemPress Child Themes: SemPress Lite, SenPress, and Index) β€’ Autonomie β€’ Independent Publisher β€’ IndieWeb Publisher β€’ mf2_s β€’ Twenty Sixteen IndieWeb-friendly fork β€’ IndieWeb Twenty Fifteen Theme β€’ Doublescores
Assistance Join the #indieweb chat β€’ IRC and other chat options β€’ WordPress FAQ β€’ WordPress Outreach Club β€’ Troubleshooting Tips β€’ WordPress tools β€’ WordPress channel
See also WordPress related wiki pages β€’ Category:WordPress plugins β€’ Category:WordPress themes β€’ Category:WordPress sessions β€’ WordPress.com β€’ WordPress using IndieMark β€’ AWS Tutorial


See Also