-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create field that automatically populates content in a post #9
Comments
Same request made at GSCR. |
What is this request, exactly? What should the field do? |
This is the 'Make a post the way Facebook does" idea. Where the Author, Editor, or Admin plops a url from some other site. and a box appears where this admin type of user can select a thumbnail and an excerpt from the site being linked to. They'd also be able to edit their own content above the linked item. Here's a video of the functionality in action: |
This will be tricky. WordPress uses a technology called oEmbed to accomplish this, which requires a specific endpoint to be done: https://oembed.com/#section1 WordPress expects oEmbed data to be returned a certain way so that it can build it out itself, so this exact method isn't an option when we're allowing any website to be used. In order to do this with arbitrary URLs, we'd have to do something much more hacky. Something like having the Server "visit" the website to view the HTML in the background, and then extract the same sort of information that a Search Engine or Facebook would see. I believe these would generally be Open Graph tags: http://ogp.me/ If it were something more hard-coded like the above, we could probably make it a Shortcode and call it a day. But having the option to select a thumbnail or specific text from the page would then require some type of interface for the User to choose specific Tags to pull information from in order to customize the output. This would likely mean some type of JavaScript interface to pull (hopefully static) tags like the Open Graph tags above for them to choose from. Using a methodology like the above (While likely what Facebook and the like uses) is a little fragile since this data could someday no longer exist, meaning the "embed" could fail. When using a proper oEmbed protocol (which we cannot depend upon existing when using random URLs) this is less of an issue. |
No description provided.
The text was updated successfully, but these errors were encountered: