ChilliSauce
asked on
Is it possible to obtainfacebook "Likes" data, to use in an application?
Hi,
This is what I want to do: I have a webstore which contains various products. Against each product I want to add the "facebook like" bookmarking function.
What I then would like to do is allow users to sort products by the number of "likes".
Is this a feasible possibility and if so how would you best acomplish it?
I know that you can add the facebook like function direct, or you could use something like "add this" - would either / both provide a possible solution to do this?
What would your suggestions be?
Thanks
This is what I want to do: I have a webstore which contains various products. Against each product I want to add the "facebook like" bookmarking function.
What I then would like to do is allow users to sort products by the number of "likes".
Is this a feasible possibility and if so how would you best acomplish it?
I know that you can add the facebook like function direct, or you could use something like "add this" - would either / both provide a possible solution to do this?
What would your suggestions be?
Thanks
ASKER
Thanks for the advice.
Can you tell me if it is possible to pass a variable with a button click and get that variable in a call back?
EG suppose I have a variable "ProductID" which I can pass with a button, if I can get that variable back then I can just update the database with a count against that product ID.
Thanks in advance
Can you tell me if it is possible to pass a variable with a button click and get that variable in a call back?
EG suppose I have a variable "ProductID" which I can pass with a button, if I can get that variable back then I can just update the database with a count against that product ID.
Thanks in advance
You can grab anything on the page with javascript: form values, inner html, tag attributes, etc so your callback function could grab it that way.
So if you had
<ul>
<li>Product Id: <span id="product-id">11134</spa n></li>
<li>Price: <span id="product-price">$23.99< /span></li >
</ul>
it would be something like
var productid = document.getElementById('p roduct-id' ).innerHTM L
I'm not a javascript expert though.
So if you had
<ul>
<li>Product Id: <span id="product-id">11134</spa
<li>Price: <span id="product-price">$23.99<
</ul>
it would be something like
var productid = document.getElementById('p
I'm not a javascript expert though.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
FAQ
How do I know when a user clicks a Like button?
If you are using the XFBML version of the button, you can subscribe to the 'edge.create' event through FB.Event.subscribe.
http://developers.facebook.com/docs/reference/plugins/like/