CdB
CdB

Reputation: 4908

Facebook application like

I'm trying about 2 days now to have a like button inside my iframe application, so that if a user presses it, the like appears in his wall like the attached image. enter image description here

Whatever i tried didn't work (no title, no image, no description).
Just a "John Doe likes a link" with the url of my app instead of the "apps.facebook.com/my_app". Like this:

John Doe likes a link  
http://www.my_site.com/my_app/

I've tried everything. Here is where i am now :

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta property="og:title" content="My title"/>
<meta property="og:type" content="product"/>
<meta property="og:url" content="http://apps.facebook.com/my_app/"/>
<meta property="og:image" content="http://www.my_site.com/my_app/img/THUMBNnighlight.jpg"/>
<meta property="og:site_name" content="My name"/>
<meta property="og:description" content="The Descr Here"/>
<meta property="fb:app_id" content="xxx"/>
<title>My title</title>
</head>

<body>
...
<fb:like href="http://apps.facebook.com/my_app/?app_data=<?php echo urlencode(base64_encode(json_encode($app_data))); ?>" send="true" width="450" show_faces="false"></fb:like>
...
<body>

Upvotes: 0

Views: 662

Answers (2)

Ksenia
Ksenia

Reputation: 173

I had the same problem as you. When I debugged my website at localhost at my home PC no information did show.

And then I changed url to some real online site (famous news site) and facebook got all the info about that site! So I guess the problem is that Facebook gets the info only from real online sites. Hope my answer helps you with your problem.

Upvotes: 2

DMCS
DMCS

Reputation: 31880

More than likely the URL is not being read correctly by facebook. See if Facebook can even read the og tags properly by linting the URL you're having them like.

https://developers.facebook.com/tools/debug

Upvotes: 1

Related Questions