Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

OpenGraph preview for shared links #142

Closed
oparoz opened this issue Sep 4, 2016 · 4 comments
Closed

OpenGraph preview for shared links #142

oparoz opened this issue Sep 4, 2016 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@oparoz
Copy link
Member

oparoz commented Sep 4, 2016

From @Matthias84 on May 20, 2016 8:51

Feature request

User type: public

User level: beginner

Description

OpenGraph is an HTML extension that allows third party sites as facebook, Twitter, ... to embedd previews for links at their own pages. It's basically just some additional meta elements:

<html prefix="og: http://ogp.me/ns#">
<head>
<title>My Link</title>
<meta property="og:title" content="My Link shows OGP" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://example.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
...
</head>
...
</html>

Depending on the priority, you can just refer to an existing image, or create an new thumbnail that mixes all the photos of a gallery.

Benefit / value

It's getting more attractive to share own photos for beginner users, as they don't need to create a teaser on their own. OC content becomes more attractive for third parties.

Risk / caveats

Sponsorship

Are you a developer willing to implement this feature?: no

Can you sponsor the development of this feature or do you know somewone who can?: no

Copied from original issue: owncloud/gallery#657

@oparoz oparoz added enhancement New feature or request junior job labels Sep 4, 2016
@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

Seems easy enough to implement.

  1. Define all the headers to add
  2. Add headers using https://github.com/owncloud/core/blob/master/lib/public/AppFramework/Http/Response.php#L172
  3. Test

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

From @Matthias84 on May 20, 2016 17:40

I'm not familar with the OC architecture, so it might be wise to add it upstream, so all apps with share functionality will benefit from the functionality. On the other hand, it might be easier to implement it first at this app and move the code later 😉

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

I think it's best if apps implement it for the type of content they're displaying. Very few apps have a public side. It will take a long time for Files to support all content types, but people can add the headers one type at a time.

For Gallery, we should probably only include references to the first 5 or so images.

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

This issue was moved to #141

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants