tags:

views:

444

answers:

2

I want to implement the Facebook "Like" button to my site, but I don't want to use FBML and iframe. Is it possible to implement this button by using plain HTML + JavaScript?

http://developers.facebook.com/docs/reference/plugins/like

+1  A: 

I don't think there is any way to create a custom, non-iframe "Like" to a non-Facebook resource, because the object needs to exist in Facebook first to add a Like to it through the API.

You can add likes to Facebook objects using the Graph API, which could be implemented in any way you choose, through Facebook Connect. But this defeats some of the purpose of the social plugins, which is to not require the user to authenticate your site before allowing interactions.

If you were to do it through Facebook Connect you would first authenticate the user, then you would POST a request to http://graph.facebook.com/[objectid]/likes. The UI for this could be implemented in any way you choose.

Renesis
A: 

Or you can also try this alternative :

http://openlike.org/

The implementation code should be something like :

<script type="text/javascript" src="http://openlike.org/v1/openlike.js"&gt;&lt;/script&gt;
<script type="text/javascript">OPENLIKE.Widget()</script> 
Tomidle

related questions