Add review request metadata for social media sites and chat services.
Review Request #65 — Created Oct. 6, 2016 and updated
Services like Facebook, Twitter, Slack, and others can make use of metadata stored on a page in order to provide more useful defaults for posts. Slack in particular benefits from this metadata, showing informative details on a link entered in the chat so that users can get a preview without first clicking the link. This adds some metadata to the review request, diff viewer, and file attachment pages, using both the Facebook OpenGraph and Twitter Card metadata formats. Slack and other services will recognize these as well. This metadata consists of a page title for the post/preview, a description (based on the review request description), an optional image (first image file attachment on the review request, if any), and branch/repository information. Combined with the upcoming Slack integration, this should prove to be a far better link sharing experience for many of our users. Testing Done: Tested the review request, diff viewer, and file attachment pages on Facebook (through their previewer tool) and Slack. Twitter's own tool was not working, but this seems due to an issue in talking to the dev server. Viewed the source of each page and checked the output. Tested with and without file attachments, repositories, and branches. Reviewed at https://reviews.reviewboard.org/r/8420/