Post swf in user facebook timeline not working - php

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??)

Related

Og:image not quickly scraped

I have a problem with the recognition of the tag og:image in my site.
This is the code generated in my php app
<meta property="og:title" content="Fondazione dell'ordine degli psicologi dell'abruzzo onlus" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://www.ordinepsicologiabruzzo.it/images/img_jolly.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="243" />
<meta property="og:image:height" content="227" />
<meta property="og:url" content="https://www.ordinepsicologiabruzzo.it/news/in-primo-piano/fondazione-dell-ordine-degli-psicologi-dell-abruzzo-onlus.html" />
<meta property="og:site_name" content="Ordine degli Psicologi della regione Abruzzo" />
But in the facebook debugger tool the image is not taken quickly and fb advice me to use og:image:width and og:image:height but... these tags are here!
I have tried using the http (and not https) version of the site but is the same.
The website is: www.ordinepsicologiabruzzo.it and a lot of pages are just correctly scraped.
Any ideas?
Your website is not currently declaring og-image in the head. You can see this by visiting your site and viewing source. You'll notice that some of your OpenGraph tags are also missing their content value, including og-image:type, og-image:width, og-image:height.
If you check Facebook's Developer tools, you will be told the same thing, that you are missing og-image.
Add the og-image tag, and just use // for the beginning of content link.
<meta property="og:image" content="//ordinepsicologiabruzzo.it/images/img_jolly.jpg" />

Share embed content on facebook using swf player

In order to share an Html content in facebook (witch may not be possible), i saw a trick using Open graph protocol and a SWF Player so the post will be treated as video post .
Exemple (link) :
<meta property="og:title" content="What anti agin method do you preffer?">
<meta property="og:image" content="https://mintsapp.io/uploads/polls/5639037a63bed.jpg" />
<meta property="og:url" content="https://mintsapp.io/poll/view/1395" />
<meta property="og:video" content="https://mintsapp.io/player/player.swf?id=1395&type=poll&token=567dcd401fb74&voteChoiceId=3172" />
<meta property="og:video:secure_url" content="https://mintsapp.io/player/player.swf?id=1395&type=poll&token=567dcd401fb74&voteChoiceId=3172" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="472" />
<meta property="og:video:height" content="355" />
and when it comes to share this page on facebook , it will be treated like a video and an html content will be compiled using that SWL player , its actually load the html content and display it as flash content .
see this link : https://mintsapp.io/player/player.swf?id=1395&type=poll&token=567dcd401fb74&voteChoiceId=3172
I need to understand how to do something similar to that, because i've been googling the whole day with no results.
Thanks

facebook share link not show fetured image

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">
...

facebook og image share for highlight feature

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">

how to generate meta tags just like facebook's linter does

I'm doing a project in which I have to show the project description to the app user and what I have is the url of the product, the url could be from any site it could be the product url from amazon, ebay etc after searching a lot I found that the facebook's linker does the same thing that I want for my project that is generating the meta tags from single url, after generating the meta tags I will get the information i needed from those tags but the question is how to generate those tags.
Below is the code in my product.php I used to debug on facebook linter
<html>
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
<meta property="fb:app_id" content="xxxxxxxxxxxxxx" />
<meta property="og:url" content="http://www.amazon.com/Programming-PHP-Rasmus-Lerdorf/dp/0596006810/ref=pd_sim_b_4" />
<meta property="og:site_name" content="social" />
<meta property="fb:profile_id" content="">
<meta property="og:type" content="website" />
<meta property="og:image" content="" />
<meta property="og:title" content="" />
</head>
<body>
</body>
</html>
When I pressed the debug button, it generates the meta tags as shown below
I want to show exactly the same output that facebook linter generate to show the product image, description to my user.
thanks in advance
If I'm understanding your question right...
Your sites meta tags:
<meta name="custom_image_tag" content="http://yoursite.com/images/product_1.jpg" />
<meta name="custom_description_tag" content="The product description" />
Php code to fetch the tags
$tags = get_meta_tags('http://www.yoursite.com/some-page.html');
echo $tags['custom_image_tag'];
echo $tags['custom_description_tag'];
As for Amazon you could use their title meta tag and scrap images from the page.

Categories