when i share my site post in facebook then not show that post featured image in facebook. show different default image. how i can solve this? my site link
i already use this open graph code.. but it's not work
<meta property="og:title" content="Bangladesh Time">
<meta property="og:type" content="website">
<meta property="og:url" content="http://bangladeshtime.com/">
<meta property="og:image" content="http://bangladeshtime.com/_files/mainlogo.png" />
<meta property="og:description" content="">
<meta property="og:site_name" content="Bangladesh Time">
Your image is to small. The minimum image size is 200*200px regarding to the documentation.
Edit: In your website's markup i can't find the open graph tags. In addition, your markup is invalid:
<center><img src='http://bangladeshtime.com/head-test-eng.jpg'></center>
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
...
Related
Is there a way to get link information through a link (title, subtitle, detail, pictures)?
Like the telegram and LinkedIn in telegram or LinkedIn when you put some link for posting or sending to channel or group you can see some detail of that link.
How can I do this for php code?
The only way to get information about that link is to crawl the page and then extract the data from special meta tags (<meta property="og:...") in the header, then display it accordingly. Perhaps you need a ready-made package that can do this, or even with jQuery you should be able to parse it. Below is the example of the tages generated on the current page:
<meta property="og:type" content="website">
<meta property="og:url" content="https://stackoverflow.com/questions/58146161/ability-to-get-article-link-information/58146431">
<meta property="og:site_name" content="Stack Overflow">
<meta property="og:image" itemprop="image primaryImageOfPage" content="https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon#2.png?v=73d79a89bded">
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" content="stackoverflow.com">
<meta name="twitter:title" property="og:title" itemprop="name" content="Ability to get article link information">
<meta name="twitter:description" property="og:description" itemprop="description" content="The only way to get information about that link is to crawl the page and then extract the data from special meta tags (<meta property="og:...") in the header, then display it accordingly. Perha...">
<meta name="twitter:app:country" content="US">
<meta name="twitter:app:name:iphone" content="Stack Exchange iOS">
<meta name="twitter:app:id:iphone" content="871299723">
<meta name="twitter:app:url:iphone" content="se-zaphod://stackoverflow.com/questions/58146161/ability-to-get-article-link-information/58146431">
<meta name="twitter:app:name:ipad" content="Stack Exchange iOS">
<meta name="twitter:app:id:ipad" content="871299723">
<meta name="twitter:app:url:ipad" content="se-zaphod://stackoverflow.com/questions/58146161/ability-to-get-article-link-information/58146431">
<meta name="twitter:app:name:googleplay" content="Stack Exchange Android">
<meta name="twitter:app:url:googleplay" content="http://stackoverflow.com/questions/58146161/ability-to-get-article-link-information/58146431">
<meta name="twitter:app:id:googleplay" content="com.stackexchange.marvin">
I'm working on a webpage for a journal where people should be able to share the articles on Facebook. The sharing itself is working, but the problem is the content of the shared post.
What I know is that I have to provide the right meta for the Facebook api to work properly. So that's what I've done in PHP . It queries the database for the title, img source, description, etc... Then it fills those in <meta> tags. And I suppose the result is ok:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta name="app_id" property="fb:app_id" content="1056245557765877">
<meta name="ogtitle" property="og:title" content="اتفاقية تعاون لدعم طلاب الدكتوراه
بين مجلس البحوث واللبنانية الاميركية">
<meta name="ogtype" property="og:type" content="article">
<meta name="ogurl" property="og:url" content="http://alanwar.com/article.php?categoryID=6&articleID=296870">
<meta name="ogimage" property="og:image" content="http://alanwar.com/issues/2693/296870_55117_s.jpg ">
<!--meta name="ogimage" property="og:image" content="#"/ -->
<meta name="ogname" property="og:site_name" content="Alanwar">
<meta name="ogdesc" property="og:description" content="وقعت الجامعة اللبنانية الأميركية (LAU) والمجلس الوطني للبحوث العلمية اتفاقية تعاون، في إطار دعم بعض الطلاب المتفوقين لدرجة الدكتوراه، ويتم التعاون بين الطرفين من خلال مركز الدراسات العليا والأبحاث في ...">
This is online , and I made sure the meta is written before the body is loading. Also here is the output from Facebook debug tool found here
Meta Tag <meta property="fb:app_id" content="1056245557765877" />
Meta Tag <meta property="og:title" content="اتفاقية تعاون لدعم طلاب الد... See More
Meta Tag <meta property="og:type" content="article" />
Meta Tag <meta property="og:url" content="http://alanwar.com/article.php?categoryID=6&articleID=296870" />
Meta Tag <meta property="og:image" content="http://alanwar.com/issues/2693/296870_55117_s.jpg " />
Meta Tag <meta property="og:site_name" content="Alanwar" />
Meta Tag <meta property="og:description" content="وقعت الجامعة اللبنانية الأ... See More
(Content copied form the debug page)
And the shared post in the debugger is displaying just like I want it to.
Now when I click share on the webpage for a real test, it only shares a link, no title, no image ... Although I think I followed the proper procedure.
Any ideas ?
I want to post swf file within user Facebook timeline but seems I am missing something. Only image is display not the swf file. Plz help what I am doing worng
var obj = {
method: 'feed',
link: 'share-page.php',
picture: 'uploads/pics/a.png',
source: 'assets/swf/preloader.swf',
name : 'name',
caption: 'Caption',
description: 'Description'
};
function callback(response) {
//some code here
}
FB.ui(obj, callback);
And my share-page.php file
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-language" content="en">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!-- Open grah tags for Facebook -->
<meta property="og:title" content="Test video player" />
<meta property="og:description" content="A video player interface experiment." />
<meta property="og:type" content="video" />
<meta property="og:url" content="share-page.php"/>
<meta property="og:image" content="uploads/pics/a.png"/>
<meta property="og:video" content="assets/swf/preloader.swf" />
<meta property="og:video:secure_url" content="assets/swf/preloader.swf" /> <meta property="og:video:width" content="325" />
<meta property="og:video:height" content="180" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
</html>
I wish I saw your question sooner...
See my answer to this question and hopefully it will help you.
Your main issue is you just put folder names (Assets and Uploads) without even saying what website/server they come from. You need a full path to files:
<meta property="og:url" content="http://www.yoursite.com/share-page.php"/>
<meta property="og:image" content="http://www.yoursite.com/uploads/pics/a.png" />
<meta property="og:video" content="http://www.yoursite.com/assets/swf/preloader.swf" />
<meta property="og:video:secure_url" content="HTTPS://www.yoursite.com/assets/swf/preloader.swf" />
Basically you should be able to paste exact same path into a new browser tab and see a working result otherwise it wont work anywhere else including Facebook. Also you need the SWF file mentioned in both "og:video" and "og:video:secure_url" tags to be coming from a genuine HTTPS server or it won't run within your timeline post (instead it opens new tab to your link).
Only image is display sounds like a lucky mistake!! Most likely because in your wall you're posting a link to your html page? Just so happens that Facebook also scans such links for a display image (It's usually random but I guess for you the shown pic WAS the only one available to find there??)
I have a lot of products and want to share each one with different title and description in Google plus instead of page meta tags. How can i do that?
Google+
Will recognize:
<meta itemprop="name" content="The page Title for sharing">
<meta itemprop="description" content="The description less than 200 characters">
<meta itemprop="image" content="http://www.yoursite.com/image-200x200.jpg">
Facebook
Open Graph Tags (Other Social networks read it too):
<meta property="og:image" content="http://www.yoursite.com/the-page-thumb-200x200.jpg" />
<meta property="og:title" content="The page Title for sharing" />
<meta property="og:type" content="website" /> (or "article")
<meta property="og:url" content="http://www.yoursite.com/the-url-for-sharing" />
<meta property="og:description" content="The Description less than 200 characters" />
<meta property="og:site_name" content="Your Site name" />
<meta property="fb:app_id" content="your-facebook-app-id" />
<meta property="fb:admins" content="your-facebook-user-id" />
Get app-id
# https://developers.facebook.com/
Login with your FB credentials and then setup a facebook app.
Use the Debug tool
# https://developers.facebook.com/tools/debug
to see how your Data is seen.
Twitter Tags
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="#publisher_handle">
<meta name="twitter:title" content="The page Title for sharing">
<meta name="twitter:description" content="The description less than 200 characters">
<meta name="twitter:creator" content="#author_handle">
<meta name="twitter:image" content="http://www.yoursite.com/image-200x200.jpg">
instead of page meta tags
You cannot. Google+ will only fetch data about the page from the page. You cannot override it with URI parameters or though any JS API.
I am sharing my website video page on Facebook. I have used a high resolution image in og meta tag.
My Issue
When I use the highlight feature for my post, facebook doesn't shows the big image like it is doing in the YouTube video sharing case. I am using following code:
<meta property="og:site_name" content="MysiteName"/>
<meta property="og:url" content="Post URL"/>
<meta property="og:title" content="你好,喬,這是工作"/>
<meta property="og:type" content="video" />
<meta property="og:image" content="Image Url" />
<meta property="og:description" content="Enter Your Sub Headline Text Here"/>
<meta property="og:video" content="Video Url" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="2048" />
<meta property="og:video:height" content="1024" />
<meta property="fb:app_id" content="AppID" />
Little preview to show, what i want to achieve. http://screencast.com/t/rxCbLySMEn
Please help to resolve the error.
Which link are you passing in og:video?
YouTube does that with the use of the og:video tag.
og:image for normal image
og:video when video in highlight mode
The URL needs to be in this format:
<meta property="og:video" content="http://www.youtube.com/v/k86xpd26M2g">