Anand Joshi
Anand Joshi

Reputation: 454

facebook like button

I have implemented a image gallery where in each image is differentiated by its record id . the like button works properly for rest of images only for two images its not working as intended , this is the post content sent by the image that is working properly

connect_text    0
edge_type   like
fb_dtsg AQC7N-EB
href    http://www.mydomain.com/images/p.php?id=2422
iframe_referer  http://www.mydomain.com/index.php
is_personalized false
layout  button_count
lsd 
node_type   link
now_connected   true
page_id 
post_form_id    7500ee8867c2d00acc75d7b6dfe2c733
post_form_id_source AsyncRequest
ref 

and the facebook response for this is :

for (;;);{"__ar":1,"payload":{"requires_login":false,"error_info":null,"show_error":false,"node_type":"ExternalLink","node_id":"10150246004339081","edge_type":"ExternalLinkLike","connect_text":0,"success":true,"already_connected":true,"user_profile":{"name":"Mamamia","profile_url":"http:\/\/www.facebook.com\/profile.php?id=100002607508082","pic_square":"http:\/\/profile.ak.fbcdn.net\/static-ak\/rsrc.php\/v1\/yo\/r\/UlIqmHJn-SK.gif"},"story_fbid":107571802673069,"is_admin":false,"admin_url":""},"invalidate_cache":[0]}

while for the faulty image post data is

connect_text    0
edge_type   like
fb_dtsg AQC7N-EB
href    http://www.mydomain.com/images/p.php?id=2420
iframe_referer  http://www.mydomain.com/index.php
is_personalized false
layout  button_count
lsd 
node_type   link
now_connected   true
page_id 
post_form_id    7500ee8867c2d00acc75d7b6dfe2c733
post_form_id_source AsyncRequest
ref 

and its response is

for (;;);{"__ar":1,"payload":{"requires_login":false,"success":false,"already_connected":false,"is_admin":false,"show_error":false,"error_info":null}}

can any body tell me why like buttons are working on some images are not working on others t ? the images content is brought from database and is linked in the page by looping the array in foreach condition so hyperlinks are same except for the id of image,the hyperlink is

http://www.facebook.com/plugins/like.php?href=http://www.mydomain.com/images/p.php?id=<?php echo $array[id]; ?>

thanks in advance

Upvotes: 0

Views: 1850

Answers (3)

chriscrossweb
chriscrossweb

Reputation: 348

I had the same error in my header. It seems the url (domain) did not pass the validation by facebook. In my case, i had 2 dots in it. www.somedomain.net16.net (just a working domain)

To see if facebook can retreive data from your site use this url:

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

To test it, just type www.google.nl and you get all kind of information back.

Upvotes: 2

Simon
Simon

Reputation: 1823

Not a proper answer, so sorry for that. But I'm experiencing the same problem exactly. It looks like facebook simply has a problem with certain GET variables in URLs. I can't think of any other explanation, it works for some and not others. The ones it doesn't work for appear to be random.

I think this must be a facebook bug. The only thing I can think to do is to either submit the bug or sit tight and hope they've spotted the problem and are working on it! Pain in the arse, mind.

EDIT: Well, I've got a workaround. Just add a random GET variable to your URL string. I went with 's=true' and that worked. Weird stuff, it must mistake URLs ending in certain numbers as character entities.

Upvotes: 2

genesis
genesis

Reputation: 50966

Use facebook's iframe suggested code which can be obtained here

http://developers.facebook.com/tools/lint/

Upvotes: 0

Related Questions