{"action":"created","comment":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments/63276319","id":63276319,"diff_hunk":"@@ -1952,6 +1956,31 @@ def full_viewer(request, iid, conn=None, **kwargs):\n         if image is None:\n             logger.debug(\"(a)Image %s not found...\" % (str(iid)))\n             raise Http404\n+\n+        opengraph = None\n+        twitter = None\n+        image_preview = None\n+        page_url = None\n+\n+        if hasattr(settings, 'SHARING_OPENGRAPH'):\n+            opengraph = settings.SHARING_OPENGRAPH.get(server_name)\n+            logger.debug('Open Graph enabled: %s', twitter)","path":"components/tools/OmeroWeb/omeroweb/webgateway/views.py","position":30,"original_position":30,"commit_id":"0ef606b10173fe3fd5d2f7075415232810c3d096","original_commit_id":"0ef606b10173fe3fd5d2f7075415232810c3d096","user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"body":"`s/twitter/opengraph/`","created_at":"2016-05-14T13:38:20Z","updated_at":"2016-05-14T13:38:20Z","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4613#discussion_r63276319","pull_request_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4613","_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments/63276319"},"html":{"href":"https://github.com/openmicroscopy/openmicroscopy/pull/4613#discussion_r63276319"},"pull_request":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4613"}}},"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4613","id":67918372,"html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4613","diff_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4613.diff","patch_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4613.patch","issue_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4613","number":4613,"state":"open","locked":false,"title":"Add support for twitter cards (full image viewer only) (rebased onto metadata52)","user":{"login":"manics","id":1644105,"avatar_url":"https://avatars.githubusercontent.com/u/1644105?v=3","gravatar_id":"","url":"https://api.github.com/users/manics","html_url":"https://github.com/manics","followers_url":"https://api.github.com/users/manics/followers","following_url":"https://api.github.com/users/manics/following{/other_user}","gists_url":"https://api.github.com/users/manics/gists{/gist_id}","starred_url":"https://api.github.com/users/manics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manics/subscriptions","organizations_url":"https://api.github.com/users/manics/orgs","repos_url":"https://api.github.com/users/manics/repos","events_url":"https://api.github.com/users/manics/events{/privacy}","received_events_url":"https://api.github.com/users/manics/received_events","type":"User","site_admin":false},"body":"\nThis is the same as gh-4260 but rebased onto metadata52.\n\n----\n\nI've had this lurking around since January 2014. Given that we now have a public resource and Twitter no longer require manual approvals I thought it's time to resurrect it. See https://dev.twitter.com/cards/types/summary-large-image\r\n\r\nThe `title` and `description` fields are mandatory, I'm assuming there will always be a non-empty image name, description is set to the owner's name if empty.\r\n\r\nAt risk of stating the obvious this can only be tested with a public image on an external server. Open an image in the full image viewer, copy the url into a tweet.\n\n                ","created_at":"2016-04-26T16:37:58Z","updated_at":"2016-05-14T13:38:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"759647b1d24b95944c15816569375b056d4d34d1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4613/commits","review_comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4613/comments","review_comment_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4613/comments","statuses_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/0ef606b10173fe3fd5d2f7075415232810c3d096","head":{"label":"manics:rebased/metadata52/twittercards","ref":"rebased/metadata52/twittercards","sha":"0ef606b10173fe3fd5d2f7075415232810c3d096","user":{"login":"manics","id":1644105,"avatar_url":"https://avatars.githubusercontent.com/u/1644105?v=3","gravatar_id":"","url":"https://api.github.com/users/manics","html_url":"https://github.com/manics","followers_url":"https://api.github.com/users/manics/followers","following_url":"https://api.github.com/users/manics/following{/other_user}","gists_url":"https://api.github.com/users/manics/gists{/gist_id}","starred_url":"https://api.github.com/users/manics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manics/subscriptions","organizations_url":"https://api.github.com/users/manics/orgs","repos_url":"https://api.github.com/users/manics/repos","events_url":"https://api.github.com/users/manics/events{/privacy}","received_events_url":"https://api.github.com/users/manics/received_events","type":"User","site_admin":false},"repo":{"id":6123531,"name":"openmicroscopy","full_name":"manics/openmicroscopy","owner":{"login":"manics","id":1644105,"avatar_url":"https://avatars.githubusercontent.com/u/1644105?v=3","gravatar_id":"","url":"https://api.github.com/users/manics","html_url":"https://github.com/manics","followers_url":"https://api.github.com/users/manics/followers","following_url":"https://api.github.com/users/manics/following{/other_user}","gists_url":"https://api.github.com/users/manics/gists{/gist_id}","starred_url":"https://api.github.com/users/manics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manics/subscriptions","organizations_url":"https://api.github.com/users/manics/orgs","repos_url":"https://api.github.com/users/manics/repos","events_url":"https://api.github.com/users/manics/events{/privacy}","received_events_url":"https://api.github.com/users/manics/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manics/openmicroscopy","description":"OME (Open Microscopy Environment) develops open-source software and data format standards for the storage and manipulation of biological light microscopy data. A joint project between universities, research establishments and industry in Europe and the USA, OME has over 20 active researchers with strong links to the microscopy community. Funded by private and public research grants, OME has been a major force on the international microscopy stage since 2000.","fork":true,"url":"https://api.github.com/repos/manics/openmicroscopy","forks_url":"https://api.github.com/repos/manics/openmicroscopy/forks","keys_url":"https://api.github.com/repos/manics/openmicroscopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manics/openmicroscopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manics/openmicroscopy/teams","hooks_url":"https://api.github.com/repos/manics/openmicroscopy/hooks","issue_events_url":"https://api.github.com/repos/manics/openmicroscopy/issues/events{/number}","events_url":"https://api.github.com/repos/manics/openmicroscopy/events","assignees_url":"https://api.github.com/repos/manics/openmicroscopy/assignees{/user}","branches_url":"https://api.github.com/repos/manics/openmicroscopy/branches{/branch}","tags_url":"https://api.github.com/repos/manics/openmicroscopy/tags","blobs_url":"https://api.github.com/repos/manics/openmicroscopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manics/openmicroscopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manics/openmicroscopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/manics/openmicroscopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manics/openmicroscopy/statuses/{sha}","languages_url":"https://api.github.com/repos/manics/openmicroscopy/languages","stargazers_url":"https://api.github.com/repos/manics/openmicroscopy/stargazers","contributors_url":"https://api.github.com/repos/manics/openmicroscopy/contributors","subscribers_url":"https://api.github.com/repos/manics/openmicroscopy/subscribers","subscription_url":"https://api.github.com/repos/manics/openmicroscopy/subscription","commits_url":"https://api.github.com/repos/manics/openmicroscopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/manics/openmicroscopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/manics/openmicroscopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/manics/openmicroscopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/manics/openmicroscopy/contents/{+path}","compare_url":"https://api.github.com/repos/manics/openmicroscopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manics/openmicroscopy/merges","archive_url":"https://api.github.com/repos/manics/openmicroscopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manics/openmicroscopy/downloads","issues_url":"https://api.github.com/repos/manics/openmicroscopy/issues{/number}","pulls_url":"https://api.github.com/repos/manics/openmicroscopy/pulls{/number}","milestones_url":"https://api.github.com/repos/manics/openmicroscopy/milestones{/number}","notifications_url":"https://api.github.com/repos/manics/openmicroscopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manics/openmicroscopy/labels{/name}","releases_url":"https://api.github.com/repos/manics/openmicroscopy/releases{/id}","deployments_url":"https://api.github.com/repos/manics/openmicroscopy/deployments","created_at":"2012-10-08T11:43:48Z","updated_at":"2014-10-22T14:24:45Z","pushed_at":"2016-05-13T09:30:53Z","git_url":"git://github.com/manics/openmicroscopy.git","ssh_url":"git@github.com:manics/openmicroscopy.git","clone_url":"https://github.com/manics/openmicroscopy.git","svn_url":"https://github.com/manics/openmicroscopy","homepage":"http://www.openmicroscopy.org","size":2093297,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"openmicroscopy:metadata52","ref":"metadata52","sha":"2c9492f3755e3b4631f0f5487719e625d7cc000c","user":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"repo":{"id":2228226,"name":"openmicroscopy","full_name":"openmicroscopy/openmicroscopy","owner":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmicroscopy/openmicroscopy","description":"OME (Open Microscopy Environment) develops open-source software and data format standards for the storage and manipulation of biological light microscopy data. A joint project between universities, research establishments and industry in Europe and the USA, OME has over 20 active researchers with strong links to the microscopy community. Funded by private and public research grants, OME has been a major force on the international microscopy stage since 2000.","fork":false,"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy","forks_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/forks","keys_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/teams","hooks_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/hooks","issue_events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/events{/number}","events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/events","assignees_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/assignees{/user}","branches_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/branches{/branch}","tags_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/tags","blobs_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/{sha}","languages_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/languages","stargazers_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/stargazers","contributors_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/contributors","subscribers_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/subscribers","subscription_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/subscription","commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/contents/{+path}","compare_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/merges","archive_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/downloads","issues_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues{/number}","pulls_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls{/number}","milestones_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/milestones{/number}","notifications_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/labels{/name}","releases_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/releases{/id}","deployments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/deployments","created_at":"2011-08-18T14:26:02Z","updated_at":"2016-05-12T12:45:57Z","pushed_at":"2016-05-14T05:04:33Z","git_url":"git://github.com/openmicroscopy/openmicroscopy.git","ssh_url":"git@github.com:openmicroscopy/openmicroscopy.git","clone_url":"https://github.com/openmicroscopy/openmicroscopy.git","svn_url":"https://github.com/openmicroscopy/openmicroscopy","homepage":"http://www.openmicroscopy.org","size":2147603,"stargazers_count":81,"watchers_count":81,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"open_issues_count":33,"forks":73,"open_issues":33,"watchers":81,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4613"},"html":{"href":"https://github.com/openmicroscopy/openmicroscopy/pull/4613"},"issue":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4613"},"comments":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4613/comments"},"review_comments":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4613/comments"},"review_comment":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4613/commits"},"statuses":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/0ef606b10173fe3fd5d2f7075415232810c3d096"}}}}