Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

What I am trying to do.

I want to be able to import heading, short description and an image into my website, just using a link.

I am using Joomla but can switch to any CMS, or try to build an extension myself. The problem is I dont know where to look for example code, or what to look for.

To me it doesn't seem like too difficult a process. Also, the code must be out there, with a little tweaking I can probably use someone elses, but I don't even know what to search for.

share|improve this question
1  
This is really unclear. Do you mean you want to build something like share links that automatically suggest a snippet etc. when posting to Facebook, and like the WordPress Press This bookmarklet? – Su' Nov 24 '12 at 10:24
@Michael I am trying to understand your question. Do you want to be able to post content FROM your website IN TO Google+ or Facebook (that's what your question title says), so that you control the particular "rich snippet" for that URL that displays e.g. image, lines of content etc? There is boilerplate for that, if that's what you want. But in your question, you said you want to import IN TO your website. From where, or is that not what you meant? – Feral Oink Nov 25 '12 at 2:22

1 Answer

The feature you are looking for is called OPEN GRAPH. Its just a bunch of meta tags you place in the head of your site which tell facebook information about it. That way when someone shares your site on facebook, facebook will use that information to populate the post. This includes the share image.

Here are the meta tags we use (replace xxx with appropriate values). I dont know Jack about joomla but I am sure there are plugins or ways to manipulate head content or add your own.

<meta property="og:title" content="xxx">
<meta property="og:description" content="xxx">
<meta property="og:type" content="website">
<meta property="og:url" content="http://xxx.com">
<meta property="og:site_name" content="xxx">    
<meta property="og:image" content="http://xxx/social/fb/facebook-share.png?v=1_ONDx13831750750541"/>
<meta property="fb:page_id" content="" />
<meta property="og:phone_number" content="1-800-000-000"/>
<meta property="og:street-address" content="xxx"/>
<meta property="og:locality" content="xxx"/>
<meta property="og:region" content="xxx"/>
<meta property="og:postal-code" content="xxx"/>
<meta property="og:country-name" content="xxx"/>            
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.