silent
silent

Reputation: 4014

How to implement the Facebook "Like" button to your site without using iframe and FBML?

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

Upvotes: 3

Views: 5882

Answers (2)

tomidle
tomidle

Reputation: 44

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"></script>
<script type="text/javascript">OPENLIKE.Widget()</script> 

Upvotes: 0

Nicole
Nicole

Reputation: 33207

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.

Upvotes: 3

Related Questions