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

Plugin Opengraph: problem with og:image #129

Closed
clickwork-git opened this issue Nov 23, 2015 · 2 comments
Closed

Plugin Opengraph: problem with og:image #129

clickwork-git opened this issue Nov 23, 2015 · 2 comments

Comments

@clickwork-git
Copy link
Contributor

is always empty an gives an error message when testing with the Facebook debugger:

https://developers.facebook.com/tools/debug/

Works without the meta tag.

@clickwork-git
Copy link
Contributor Author

Adding something like this do retrieve the linked image and define the image url for OG could do it:

$content = $Post->content();
$sstring1 = '/content/uploads/';
$pos1 = strpos($content,$sstring1);
$string1 = substr($content, $pos1);
$sstring2 = '.';
$pos2 = strpos($string1,$sstring2);
$string2 = substr($string1, 0, $pos2+4);
$url = $Site->url();
$imgurl = $url;
$imgurl .= $string2;

Im not very good in PHP, but it works. Perhaps it could be coded more elegant.

@dignajar
Copy link
Member

I will work on it, thanks.

@dignajar dignajar closed this as completed Dec 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants