Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Post custom text with facebook like button

i am having some tweets like things and i would like to post that custom text with facebook like button. is it possible if yes then how.

thanks

like image 744
Gul Avatar asked Jan 22 '12 05:01

Gul


2 Answers

Use Open Graph Tags:

Put this tags on your page head section:

<html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta property="og:image" content="custom image path" /> 
<meta property="og:site_name" content="name of the website" /> 
<meta property="og:title" content="custom title" /> 
<meta property="og:url" content="url of the page" /> 
<meta property="og:description" content="custom description" /> 
<meta property="og:type" content="website/article/game etc.." /> 
</head>

use Linter to check your custom properties has affected.

More about Opengraph tags

like image 181
Rishi Php Avatar answered Nov 08 '22 04:11

Rishi Php


You should add OpenGraph meta tags to the page located on URL you linking your like button. Once user click on Like Button Facebook crawl that page and post content of OG tags to feed.

Read more on Like Button documentation and Open Graph protocol

like image 24
Juicy Scripter Avatar answered Nov 08 '22 05:11

Juicy Scripter