close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Facebook Like and Share problems

Thread began 3/19/2013 12:13 pm by Christopher West | Last modified 3/27/2013 4:29 pm by Jason Byrnes | 2057 views | 30 replies |

Christopher WestCommunity Expert

Facebook Like and Share problems

Hi, I have the below code inserted in all pages of my eccommerce website...however they dont seem to work on the actual product detail pages (the social buttons dont get displayed).
The structure of my website is using Framework Builder so the main products.php file in the root of the website will pull in files from a sub folder called plugins (since there are product-summary and product-detail pages I wanted them both to use the the same products.php file for URL to look tidy...anyway (Im rambling) since the product page is the only page im using the social buttons on that uses framework builder - is this a limitation of framework builder and social buttons??

here is the code for social:
<div class="social">
<div class="social-left">
<div class="wasocial_facebook_like">
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="<?php echo urlencode(((!empty($_SERVER["HTTPS"])) ? "https://" : "http://") . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); ?>" send="false" layout="standard" width="450" show_faces="false" action="recommend" colorscheme="light" font=""></fb:like>
</div>
</div>
<div class="social-right">
<div class="wa_social_counter_hr">
<div class="wasocial">
<div class="icons"> <a name="fb_share" type="icon" href="#" onclick="window.open('http://www.facebook.com/sharer.php?u=<?php echo urlencode(((!empty($_SERVER["HTTPS"])) ? "https://" : "http://") . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); ?>', 'Facebook', 'toolbar=0,status=0,width=626,height=436'); return false;" title="Facebook"><img src="webassist/social/icons/facebook.png" /></a></div>
<span>Share</span> </div>
</div>
</div>
</div>
<p>&nbsp;</p>



Chris

Sign in to reply to this post

Jason ByrnesWebAssist

send a link please.

Sign in to reply to this post

Christopher WestCommunity Expert

Hi Jason, here is a link to one of the product pages:
so this page is products.php but the actual file that includes the webassist facebook code is plg_products.php which is loaded via framebuilder extension.

products.php?dinky=product-detail&result=60

I got the facebook share icon displaying...just the facebook recommend button on the left hand side isn't displaying...
also I note that when user clicks on the Facebook share button that the product image cisnt showing..only the website logo...is there a way of chosing what image facebook can use as it would make sense for the facebook share button to use this pages product image and even text....

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

where is the recommend button supposed to be? I don't see code for it on your page?



you can control the image and text used when you like a page by adding custom meta tags:

<meta property="og:title" content="title" />
<meta property="og:description" content="description" />
<meta property="og:image" content="thumbnail_image" />
Sign in to reply to this post

Christopher WestCommunity Expert

Hi Jason, ok for your reference I am using Internet Explorer and I have Notepad++ installed if I right click and select VIEW SOURCE for that webpage then when the sourcecode loads up in Notepad++ the facebook recommend (as in LIKE but using recommend wording option from the webassist options panel) the code is on line 441.

Chris

here is the code copy and pasted directly from that page:

<div class="wasocial_facebook_like">
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="plugins/functions/http%3A%2F%2Fdinkyfingerprint.co.uk%2Fproducts.php%3Fdinky%3Dproduct-detail%26result%3D60" send="false" layout="standard" width="500" show_faces="false" action="plugins/functions/recommend" colorscheme="light" font=""></fb:like>
</div>

Sign in to reply to this post

Jason ByrnesWebAssist

but where in the page should it be displaying is my question....

Sign in to reply to this post

Christopher WestCommunity Expert

Hi Jason ok under the product title..the facebook recommend code would be placed directly under this and on the far right you can see the facebook sharebutton...

im attaching an image file to show where exactly....

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

the href attribute for the fb:like tag looks off:


<fb:like href="plugins/functions/http%3A%2F%2Fdinkyfingerprint.co.uk%2Fproducts.php %3Fdinky%3Dproduct-detail%26result%3D60"


that should be:
<fb:like href="http%3A%2F%2Fdinkyfingerprint.co.uk%2Fproducts.php %3Fdinky%3Dproduct-detail%26result%3D60"

Sign in to reply to this post

Christopher WestCommunity Expert

Hi ok as its using dynamic code in the actual file how do I change the file you refer to: which is:

<fb:like href="<?php echo urlencode(((!empty($_SERVER["HTTPS"])) ? "https://" : "http://") . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); ?>" send="false" layout="standard" width="500" show_faces="false" action="recommend" colorscheme="light" font=""></fb:like>

Sign in to reply to this post

Christopher WestCommunity Expert

I reapplied the facebook behaviour to the page and this time I entered in the direct product page so in internet explorer if you right click on view source code and look at the code on line 449 it reads:
<fb:like href="http://www.dinkyfingerprint.co.uk/products.php?dinky=product-detail&result=96" send="false" layout="standard" width="450" show_faces="false" action="plugins/functions/like" colorscheme="light" font=""></fb:like>

but it still doesn't display anything, I even tried IE7, IE8, I9 and Google Chrome.

This problem is only occurring on this page since the facebook code is in plu_products.php and that's a framework builder static plug that's being loaded in products.php (the products.php file is in root directory) and the plg_products.php file is in the folder plugins which is a folder in the root of the hosting. Could that be the reason why its not displaying? as this same code works fine in php files that are stored in the root.

Chris


Chris

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...