1

I'm looking to integrate the "like" button into a website, but I'm a little confused with the information available on the web. I read this article, which was in another stackoverflow article, but have some questions: http://www.saschakimmel.com/2010/05/how-to-capture-clicks-on-the-facebook-like-button/.

I've setup a "Page" already in facebook, and from what I understand in the link above, you need to setup an "App" to get an API key. What I don't understand though is that if I use this API Key, it's going to be pointing to my newly created "App", which has no fan base. How do I link this API Key, (or setup another key through the page admin), so I can have users "like" the real facebook page?

I want to run some javascript functions the moment a user likes the page, but I'm also a little confused on what API functions call, and whether these return a true/false value? I only really want to run these js functions if the user has not already liked the page..

Hope this all makes sense, would love any explanations you have to offer to point me in the right direction.

BUMP

Sami.C
  • 561
  • 1
  • 11
  • 24

2 Answers2

0

after making a page and registering for it on face book, you will get a link, o trough the process again. Then just paste this link on your web site and you will get the like box. Paste it in a div tag.

You can also make a function in js which calls this like box and on its dependency you can call other js functions also.

//js code

function js()

{

create element div;

}

function other()

{

js();

}

user909058
  • 188
  • 1
  • 2
  • 11
0

If you just want an like button in your page , go to http://developers.facebook.com/docs/reference/plugins/like/

paste your fb page url in "URL to Like (?)" text box

get the code

paste in the div box of ur web site source code where you want it to appear

Kuntady Nithesh
  • 11,371
  • 20
  • 63
  • 86
  • and is it possible to get a value returned from this to check whether the page was actually liked? e.g someone not logged into fb might click on it. – Sami.C Aug 26 '11 at 04:20
  • Why do you want to do that ? . If someone who not logged into fb clicks den it will pop up a window to sign in . Thats make sure dat user who need to like msust be a fb user – Kuntady Nithesh Aug 26 '11 at 04:23
  • and as soon as he likes button gets disabled. – Kuntady Nithesh Aug 26 '11 at 04:27
  • I am attempting to set a promo code in the background when someone "likes" the page. If they aren't logged in, they can click like and get a discount without actually logging in and doing it.. Similarly if someone already has liked the page there should be a way to find this out. – Sami.C Aug 26 '11 at 04:38
  • can you now see why I would like to know whether the "like" was successful? – Sami.C Aug 26 '11 at 04:39
  • why cant you go for your own custom button ? – Kuntady Nithesh Aug 26 '11 at 04:44
  • i do not see how a custom button would allow me to "extract" a response out of facebook about whether the LIKE was successful or not. Please explain. – Sami.C Aug 26 '11 at 04:45
  • Ugh, because I want to increase the number of users on our facebook page. It is a marketing tool. – Sami.C Aug 26 '11 at 04:58