Is there a way to reload the page after clicking <fb: like>?
I'm curious about this: I have a simple facebook-connect application that will show only certain content after logging in and like a certain page. It works (huzzah!), But I want to make it more user-friendly by making it automatically updated after pressing the type button.
Here is the code:
<?php
if ($me) {
$pageid = -----------;
$uid = $me['id'];
$likeID = $facebook->api(
array( 'method' => 'fql.query', 'query' =>
'SELECT target_id FROM connection WHERE source_id = ' . $uid . ' AND target_id = ' . $pageid )
);
if ( empty($likeID) )
{
// Person is LOGGED IN, but has NOT LIKED
echo '<script src="MY WEBPAGE"></script><fb:like href="MY WEBPAGE" layout="box_count" show_faces="false" width="450"></fb:like>';
}
else
{
// Person is LOGGED IN, and has LIKED, score!
echo 'Download link';
}
}
else
{
// Person is NOT LOGGED IN, so we know NOTHING
echo '<script src="MY WEBPAGE"></script><fb:like href="MY WEBPAGE" layout="box_count" show_faces="false" width="450"></fb:like>';
} ?>
Is there anything I can do for this code (possibly in the fb: like tag?) That forces it to reload the page after which?
Thank.
+3
1 answer