Ever wondered where the image, title and text come from when you share or like a link on Facebook?
Has your site ever had a weird image, title or text show up when you’ve shared it?
This information is either selected by Facebook after it “scrapes” your page for an image, title and description, or, via the Facebook open graph meta properties. If these properties aren’t set, it can pull up weird and random images and text from your site. When people share or like your link, this info is being shown to their friends or even the public so it is wise to control what they see, so at least they see the right thing. People can and do abuse these properties, but setting them will make sure that your business or website is being displayed and promoted correctly.
There are several methods I use for my websites to control the image, title and text displayed. However I usually create it dynamically using WordPress hooks and fallback coding. For example: if there is no image in the post or on the page, it will use an image I have set as the default fallback, like the site’s logo. It will also create the title and description dynamically using WordPress hooks and fallback coding. Using this code, it will always show an approved image and the correct title and text description.
Code like this can also be used for Pinterest…
Try sharing your site on Facebook. What do you see? Do you need to contact me?