facebook - different callbacks on FB like -


i have 2 fb buttons on page, 1 in footer , 1 content is. different urls. 1 in footer likes website, , 1 on content likes content specific url. want callback each different things. how do this? right i'm listening fb.event.subscribe('edge.create') both both callbacks executed regardless of button clicked.

sometimes user land on content page (both buttons loaded), other times user navigate (footer button loaded first). single page application. not sure if these details matter.

i guess wouldn't specific fb likes. binding twitter tweets similar. how workaround this? thanks.

you can pass argument edge.create callback, full url -

fb.event.subscribe('edge.create',     function(response) {         if(response == 'http://ubuntu.com') alert('liked ubuntu.com');         if(response == 'http://bing.com') alert('liked bing.com');         if(response == 'http://google.com') alert('liked google.com');     } ); 

check full example on http://jsfiddle.net/mxxy2/1/


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -