Active
Project:
Facebook-style Micropublisher
Version:
7.x-1.0-unstable1
Component:
Code - API
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Feb 2014 at 09:42 UTC
Updated:
20 Dec 2016 at 08:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
myselfhimself commentedHere is a patch that adds a hook named "hook_fbsmp_link_request_contents" for third-party modules URL parsing in place of the link plugin's parsing.
Note that emvideo and emaudio parsers still come first when enabled, and will superse any third-party parsing modules that could plug in with the new hook.
Comment #2
myselfhimself commentedHere is an example module implementation for the new hook that adds basic Open Graph (og:*) attributes parsing thanks to the url-scraper-php github project (PHP licence ?, authored by morshedalam).
With this example module: youtube, vimeo and dailymotion video pages, www.lemonde.fr (famous French newspaper website) articles and other famous press sites get parsed correctly (title, description, thumbnail). Google.com and wikipedia.org home pages do not get parsed well still.
Note: I have renamed and deleted files in the example_module archive to remove customer's branding, I have not tested but the code quality should be ok.
Make sure to rename .tar_.gz file to .tar.gz before extracting (d.org security renaming...).
Comment #3
myselfhimself commentedComment #4
myselfhimself commentedComment #5
myselfhimself commentedComment #6
designguru commentedThe module set in #3 didn't do anything to help this problem for me...
q./
Comment #7
mr.andrey commentedApplied patch in #1 and downloaded/enabled module in #2, YouTube thumbnails now show up. Thanks!
Unfortunately, it breaks other links, like Drupal.org, for example.
The $data array returned is this
To fix, I added:
... before
... so if this custom script can't fetch the title, don't bother returning a non-empty array.
It's still not perfect and needs some development love, but at least it's fetching some images.
Cheers,
A.
Comment #8
keith.penn27 commentedHello everyone! I am looking for a solution to this same issue. I have tried the above patch and module but it didn't work for me. Am I missing something that I should have done? I am using Drupal 7.51 and FBSMP 7.x-1.0-alpha1. Please help! I have been working on this for a couple of days now and all I can get for the thumbnail is https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif.
Comment #9
ugintl commentedThere is a module called opengraph filter which you can enable in a text format and it is working perfectly for me, but it does not embed the content. Any solution to embed the content using the link option?