简体   繁体   中英

Facebook like button - on an ebay page?

I need to get someone a facebook like button. Now, this would usually be very easy (with facebook's hackjob of an API with iframes), but, he/she wants it on an Ebay page. How would I go about this? Ebay doesn't seem to allow Javascript on seller pages, so, maybe a static like button, that a php script updates (somehow)?

eBay doesn't allow iframes or javacsript.

That is why this company called 3DSellers came with ShareYourItems app which is inserting Share & Like buttons with Flash (which is allowed): http://www.3dsellers.com/products/share-your-items/

here is the place for the Facebook generator http://developers.facebook.com/docs/plugins/

ok your code in Dream weaver when you start out looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>

ok when you add the first part of the HTML5 generated code from facebook your code should look similar to this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</body>
</html>

ok then the second part of the code gets inserted and it should look something like this except with your info:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</body>
</html>
<div class="fb-send" data-href="http://example.com"></div>

Copy the whole code from dreamweaver into the top of an ebay listing under the html tab.

I don't know the ebay infrastructure too well, but maybe you can use open graph api. For your reference: http://developers.facebook.com/docs/opengraph/

Ok I have accomplished this in Dreamweaver cs 6.

  • open DW
  • create new html
  • in the code mode go to the tag in the code that says < body>
  • after < body> copy from facebook html generator the first portion of the HTML 5 code
  • paste it after the < body> in DW
  • copy the second part of the facebook HTML 5 code and paste in DW after the < /body> copy the whole code in DW and put in the HTML portion of listing on ebay at the Top of the listing and put two dots after the code to mark it for easy referance

submit listing in ebay

I even added a swf flash movie to my code and works fine. I have a Facebook like button on my store page and on my listings, as well as an auto play flash slideshow of my items. all free no third party app. PS all pictures or flash movies have to be on a Third party host site for them to work. you can check out my website at www.mojotrading.biz there will be links there to direct you to my ebay pages to show you what it looks like.

does Ebay allow iframes? Then you could implement the iframe-variant of the like button.

Look here and copy the plain iframe-tag from the generated sourcecode: http://developers.facebook.com/docs/reference/plugins/like/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM