Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGraph preview for shared links #657

Closed
Matthias84 opened this issue May 20, 2016 · 5 comments
Closed

OpenGraph preview for shared links #657

Matthias84 opened this issue May 20, 2016 · 5 comments

Comments

@Matthias84
Copy link

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

@oparoz
Copy link
Contributor

oparoz commented May 20, 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

@Matthias84
Copy link
Author

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
Contributor

oparoz commented May 20, 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
Contributor

oparoz commented Sep 4, 2016

This issue was moved to nextcloud/gallery#141

@oparoz
Copy link
Contributor

oparoz commented Sep 4, 2016

This issue was moved to nextcloud/gallery#142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants