Jump to content

Topic on Extension talk:OpenGraphMeta/Flow

How do I change og:image in the meta tags?

8
Lucy Tech (talkcontribs)

I've added the extension to localsetting.php and then I clicked 'edit' and added the code {{#setmainimage:Sunset.jpg}}. However when I click 'facebook like' it doesn't use the image 'sunset.jpg' and I've checked the meta data and there it hasn't changed the og:image source. How do I use this extension? What am I doing wrong?

Rotsee (talkcontribs)

Try changing NewFromDBKey to NewFromTitle, this code seems to rely on an older(?) version of the Title class.

Dantman (talkcontribs)

What are you talking about? Title::newFromDBKey still exists and always has. And since we have a DB key it's the right method to use. While Title::newFromTitle does not exist and is conceptually ridiculous.

Rotsee (talkcontribs)

Sorry, I just assumed that the reason this extensions doesn't seem to work with newer versions of MW was that it tried calling newFromDBkey like this Title::newFromDBkey($data['dbkey'], NS_FILE), whereas newFromDBkey now only seems to accept one parameter. Using newFromText instead, or something like Title::newFromDBkey( "File:" . $data['dbkey'] ) made it work for me. rotsee (talk) 19:02, 17 September 2012 (UTC)

Rotsee (talkcontribs)

Oops, did I write newFromTitle? That doesn't make sense, should have been newFromText, of course. :-) rotsee (talk) 19:03, 17 September 2012 (UTC)

Dantman (talkcontribs)

Is your wiki publicly available so I can debug?

Reply to "How do I change og:image in the meta tags?"