I have a facebook app that load some content with ajax, including some like buttons implemented with iframe.
While everything seems ok and in my pc is working properly, in my clients pc it does not work and the json response of ‘like’ is : 307 temporary redirect.
At first i thought that it must have been a firewall issue so i proposed my client to test another application that has ‘like’ button. Unfortunately, everything was ok in the other app.
The thing that puzzles me is that the structure of the iframe is identical:
mine:
<iframe scrolling="no" frameborder="0" src="http://www.facebook.com/plugins/like.php?href=http://www.chivastimeforfriends.com/single.php?fb_ref=4f15a6ed73f3a&layout=button_count&show_faces=false&width=150&action=like&font=trebuchet+ms&colorscheme=light&height=21" style="border:none; overflow:hidden; width:150px; height:23px;" allowtransparency="true"><iframe>
other app
<iframe scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:150px; height:80px;" src="http://www.facebook.com/plugins/like.php?href=http://www.stolichnaya.gr/stoli/fb/outletitem.php?outid=12&layout=button_count&show_faces=false&width=150&action=like&font=trebuchet+ms&colorscheme=light&height=21"></iframe>
Facebook debugger does not show any problem in my app. The other app has not even meta tags.
The only difference is that while the other app json response is returned in just 2 seconds , in my app takes about 13 second. Has this anything to do with the problem?
Any ideas?
Thanks
You need to url_encode the href you send to facebook. You cannot have another
?sign:You could use the PHP function url_encode.
http://php.net/manual/en/function.urlencode.php