0

I'm using the wordpress plugin from http://www.sociable.es/facebook-wordpress-plugin-3-0/ on my blog, and I try to figure out, how they hide their download till I click the "Like" button on the post.

I tried:

<fb:fbml version="1.1">
<fb:visible-to-connection>HIDDEN CONTENT</fb:visible-to-connection>
</fb:fbml>

But it didn't work.

Is there a way with the Javascript SDK or any other solution?

Thanks a lot!

genesis
  • 50,477
  • 20
  • 96
  • 125
Joko
  • 1
  • 1

2 Answers2

1

I think FBML has been done away with. Found this bit of code:

$request = $_REQUEST["signed_request"];

list($encoded_sig, $load) = explode('.', $request, 2);

$fbData = json_decode(base64_decode(strtr($load, '-_', '+/')), true);

if (!empty($fbData["page"]["liked"]))

{ ?>

You are a fan 

<?php } else { ?>

You are not a fan 

<?php }

//print_r($_REQUEST);

?>

However, the request variables are not being picked up by my iFrame. Will update as i figure it out.

NB - would only works for the first time the user likes the page. you'd have to then save the session variable or something.

circusdei
  • 1,967
  • 12
  • 28
0

Here's a ready solution for Wordpress: Like 2 Unlock for Wordpress

Jean Louis
  • 1,485
  • 8
  • 18
  • 33