Jump to content

Facebook and PHP


Recommended Posts


I'm not an expert on Widgets, but the FaceBook comment-widget sees both URL's

as different addresses (while they actually point to the same page).

When you right click the widget and have a look at it's properties, you will

see that one has a parameter-list like:

[...]&xid=http%253A%252F%252Fwww.teetradio.com%252Findex.php[...]

...while the other has:

[...]&xid=http%253A%252F%252Fwww.teetradio.com%252F[...]

so both effectively have a different XID. :unsure:

I'm not sure how you can force the widget to use the same parameter-list for

both "Addresses" (you could use frames to force it, for instance), but like I

said, I never work with FaceBook (or widgets in general), so I can't be of

real help here, sorry. :no:

Also inspect your code, since there are a few errors in it; the first one being

somewhere at the top:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<!-- Fav Icon for Page -->
<LINK REL="SHORTCUT ICON" HREF="http://www.teetradio.com/home.ico">
<!-- END of Fav Icon for Page -->

<style>
<!--
p{font-family:arial,sans-serif}-->
</style>
</head>
[...]
</head>

(There are 2 </head>-closing tags...) :whistle:

Greetz,

Peter.

Link to comment
Share on other sites

There isn't any real need to have to see the problem with another type of browser

(but I'm sure you could do the same with FireFox), you'll have to find a way to

fix the problem. :unsure:

Somewhere in the php-script there must be something that links to this FaceBook

widget; you simply have to force this piece of code to always use the same xid

or you could use a workaround with, for instance, frames, where you put the code

containing the widget is in a certain frame that doesn't change addresses, whether

you're using only the domain-name or a URL including the document-name. :rolleyes:

Just to give you a general idea about using frames:

  • Rename index.php to index1.php
  • Create a new page, named index.html, with this code:
    <frameset rows="*,*" border="0">
    <frame name="main" src="index1.php" frameborder="0">
    </frameset>


  • Make sure the server defaults to an index.html-page if an index.php-script
    could not be found OR use this PHP-script instead (saved as index.php):
    <?php
    echo '<frameset rows="*,*" border="0">'.
    '<frame name="main" src="index1.php" frameborder="0">'.
    '</frameset>';
    ?>


  • Test

Greetz,

Peter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...