Welcome to WebmasterWorld Guest from

Forum Moderators: httpwebwitch & not2easy

Message Too Old, No Replies

Can Facebook "Like" Trigger an Action?



1:54 am on Oct 3, 2010 (gmt 0)

5+ Year Member

is there a way to create a redirect or show specific FBML if someone likes a FanPage?

I am trying ot optimize the like button to its fullest potential and seeing that if I can get users to like and then they get something in return would be great.

so I am wondering if there is a way to do so. or maybe even utilize mockajax with FBJS to create a popover (not sure if that is possible)

but yea that is what i want to try to do.


7:24 pm on Oct 11, 2010 (gmt 0)

5+ Year Member


Using FB.Event.Subscribe to 'edge.create' should allow you to do something when they click like. It's also possible to use the
tag to show content to people who have liked.

One limitation of pages is that a user needs to interact with it before you can tell if they like the page. You could therefore have a button that people who like your page clicks that then sends an ajax call to retrieve some more data.


4:15 pm on Oct 18, 2010 (gmt 0)

5+ Year Member

thanks - I got it to work the way I wanted to. there isnt a way to do it with the share button is it? I can't seem to find the FBML code for that, or maybe if there a code that can be like

if click on share then show this div?


8:12 pm on Oct 18, 2010 (gmt 0)

5+ Year Member

I'm not sure, but then again the whole functionality of the share button is built around sharing on facebook so it has it's default behaviour tied to a javascript event anyway.

Saying that ( I always search and type ) the url format is listed at the bottom of this page


and it always takes the same format so you might be able to do something similar to the following (not tested)

<a href="http://www.facebook.com/sharer.php?u=<encoded url to share>&t=<title of content>" onclick="myfunc(); return false">Share</a>
function myfunc(){
// do something
//show iframe with above url in perhaps?

Featured Threads

Hot Threads This Week

Hot Threads This Month