Search Webmaster Help and Solution

Problem with Facebook "Like" Code

The code of Facebooks Like button (javascript included to my php script) contains one line that causes some browsers to post a complete page request twice to my server. This causes some malfunctions cause parts of my code are programmed not to accept doubleposted requests. however, the user doesnt get to see the first but the 2nd loaded page in his browser - the one with the error message of my server in.

It could be the use of two kinds of quotation marks that causes the double request in some browsers (not in most current browsers).
If I delete the line, everythings fine, just the Facebook Like button wont work then ...
Here is the line:
document.writeln(<fb:like href="http://domainname.com" layout="button_count" show_faces="false"></fb:like>);

I slash out the single quotation marks to get the thing going within an echo ...;
Any ideas? Maybe the codeline could be rewritten using one type of quotation marks only? The code of Facebooks Like button (javascript included to my php script) contains one line that causes some browsers to post a complete page request twice to my server. This causes some malfunctions cause parts of my code are programmed not to accept doubleposted requests. however, the user doesnt get to see the first but the 2nd loaded page in his browser - the one with the error message of my server in.

It could be the use of two kinds of quotation marks that causes the double request in some browsers (not in most current browsers).
If I delete the line, everythings fine, just the Facebook Like button wont work then ...
Here is the line:
document.writeln(<fb:like href="http://domainname.com" layout="button_count" show_faces="false"></fb:like>);

I slash out the single quotation marks to get the thing going within an echo ...;
Any ideas? Maybe the codeline could be rewritten using one type of quotation marks only?

View Complete Thread with Replies

Related Items

Query failed: connection to localhost:3354 failed (errno=111, msg=Connection refused).