Facebook Share
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '782543028437100', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '782543028437100', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('
script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/ all.js';
document.getElementById('fb- root').appendChild(e);
}());
</script>
<script src="//ajax.googleapis.com/ ajax/libs/jquery/1.6.1/jquery. min.js" type="text/javascript"></ script>
<h1>Listing products</h1>
<table>
<tr>
<th>Name</th>
<th>Description</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @products.each do |product| %>
<tr>
<td><%= product.name %></td>
<td><%= product.description %></td>
<%#= social_share_button_tag(produc t.name, :url => "http://localhost:3000/ products/#{product.name}") %>
<td><%= link_to 'Show', product %></td>
<td><%= link_to 'Edit', edit_product_path(product) %></td>
<td><%= link_to 'Destroy', product, confirm: 'Are you sure?', method: :delete %></td>
</tr>
<a href="shareere" id = "share_button">shhhhh</a>
<script type="text/javascript">
$(document).ready(function(){
$('#share_button').click( function(e){
e.preventDefault();
FB.ui(
{
method: 'feed',
name: '<%=product.name%>',
link: ' http://localhost:3000',
picture: 'http://www.hyperarts.com/ external-xfbml/share-image.gif ',
description: 'This is the content of the "description" field, below the caption.',
message: ''
});
});
});
</script>
<% end %>
</table>
<br />
<%= link_to 'New Product', new_product_path %>
<style type=”text/css”> img#share_button {cursor: pointer;} </style>
e.src = document.location.protocol +
'//connect.facebook.net/en_US/
document.getElementById('fb-
}());
</script>
<script src="//ajax.googleapis.com/
<h1>Listing products</h1>
<table>
<tr>
<th>Name</th>
<th>Description</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @products.each do |product| %>
<tr>
<td><%= product.name %></td>
<td><%= product.description %></td>
<%#= social_share_button_tag(produc
<td><%= link_to 'Show', product %></td>
<td><%= link_to 'Edit', edit_product_path(product) %></td>
<td><%= link_to 'Destroy', product, confirm: 'Are you sure?', method: :delete %></td>
</tr>
<a href="shareere" id = "share_button">shhhhh</a>
<script type="text/javascript">
$(document).ready(function(){
$('#share_button').click(
e.preventDefault();
FB.ui(
{
method: 'feed',
name: '<%=product.name%>',
link: ' http://localhost:3000',
picture: 'http://www.hyperarts.com/
description: 'This is the content of the "description" field, below the caption.',
message: ''
});
});
});
</script>
<% end %>
</table>
<br />
<%= link_to 'New Product', new_product_path %>
<style type=”text/css”> img#share_button {cursor: pointer;} </style>
No comments:
Post a Comment