Mobile app version of vmapp.org
Login or Join
Cofer257

: What is the feature that imports URL information into Facebook and Google+? I want to be able to import a heading, short description, and an image into my website, just using a link. I am

@Cofer257

Posted in: #Facebook #GooglePlus #Import #Joomla #Url

I want to be able to import a 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 don't 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 else's, but I don't even know what to search for.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

When you paste a URL into Google+ or Facebook, they automatically fill in the post with information from that page. It sounds like you are trying to replicate that functionality for your site.

To do so, you would have to crawl the page to gather information about it. For example, Facebook uses a bot with the following user agent to download pages when URLs are shared: facebookexternalhit/1.1 (+https://www.facebook.com/externalhit_uatext.php).

The crawler would then need to extract information from that page. For example, the page title is between the <title> tags. The description is in the <meta name="description" content="..."> tag. Images can be taken from <img> tags. Facebook lets users choose which of the images from the page they want to use.

10% popularity Vote Up Vote Down


 

@Moriarity557

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 don't 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"/>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme