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

Handling Multiple OGP Image tags #7

Open
MitchellMcKenna opened this issue Feb 8, 2013 · 1 comment
Open

Handling Multiple OGP Image tags #7

MitchellMcKenna opened this issue Feb 8, 2013 · 1 comment

Comments

@MitchellMcKenna
Copy link
Contributor

The OGP Arrays section says websites can have multiple images associated with a page and that the "first tag (from top to bottom) is given preference during conflicts".

Currently in the library it looks like if the page has multiple og:image tags, each one will overwrite the previous, so when you call $graph->image you will only get the last og:image value back. Images and any other tags that can have multiple values (eg. videos and audio) should probably return an array.

@Argonalyst
Copy link

Well, I'm actually experiencing some problem when I call the $graph->image and the website that I'm parsing dont have the meta property image on it.. so it is resulting in a empty array that is really bugging me out, because it is creating empty img tags (img src="" /) ... The most websites are badly formated for opengraph, its not well disseminated yet or forever, so we should improve the way we handle the results that we get from $graph-> in a better way... I'm working on it

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

No branches or pull requests

2 participants