Shakir Khan
Shakir Khan

Reputation: 765

facebook og:title, og:description, og:image etc not working

I am working on a codeigniter project but i ma stuck in facebook sharing, i want to share page title, page description, and a fix image. for this I used these og tags in my head section

<meta property="og:title" content="{meta_title}"/>
<meta property="og:type" content="article"/>
<meta property="og:site_name" content="HalaFund"/>
<meta property="og:description" content="{meta_description}"/>
<meta property="og:image" content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" />
<meta property="fb:admins" content="1234" />
<meta property="fb:app_id" content="1621907508042530" /> 

my website url is halafund.com and i want to share projects page like

http://halafund.com/project/index/fundraise-halafund-project-test-page google+ sharing working properly but facebook share giving same title description and image.

for facebook sharing I used fb sdk after body tag

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=1621907508042530";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

and for facebook share button

<div class="fb-share-button" data-href="http://halafund.com/project/index/fundraise-amis-campaign" data-layout="button_count"></div>

Upvotes: 1

Views: 3726

Answers (2)

Sagar
Sagar

Reputation: 647

Debug your website page in FB Debugger. Visit https://developers.facebook.com/tools/debug/

Put your website link in above mentioned link and see the warnings under "Warnings That Should Be Fixed". Right now I am seeing 4 issue, please fix those issues first and try.

Upvotes: 2

maalls
maalls

Reputation: 759

facebook caches og tag for performance reason. To force clearing the cache, you can use their debug tool https://developers.facebook.com/tools/debug/

Upvotes: 5

Related Questions