Share facebook

Where can be found in the script Share facebook.
I could inform the facebook page of my products.


Thanks.

nimetön.jpg · 320.4K · 187 views
Quote · 9 Apr 2014

is here somebody who know where i can get this?

Quote · 9 Apr 2014

Anybody know any?

Quote · 10 Apr 2014

Anybody? Please

Quote · 12 Apr 2014

 

Where can be found in the script Share facebook.I could inform the facebook page of my products.

Explain better what it is that you want to do...

Look here to read: https://developers.facebook.com/docs/plugins/share-button/

 

Quote · 12 Apr 2014

 

 

Where can be found in the script Share facebook.I could inform the facebook page of my products.

Explain better what it is that you want to do...

Look here to read: https://developers.facebook.com/docs/plugins/share-button/

 

I have a sales pages, and I want to share these pages with Facebook.
that people can click on the notification and have access to read and to look better notice, so i need share button.
I now will share button code and the second code.


Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.
<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/fi_FI/all.js#xfbml=1&appId=774310692581891"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
 
Place the code for your plugin wherever you want the plugin to appear on your page.

<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-width="400" data-type="button"></div>

so where those codes need to put when I want to share button look photo

share button.jpg · 381.3K · 207 views
Quote · 16 Apr 2014

all i did was add a new html block 

share.jpg · 83.3K · 156 views
Quote · 16 Apr 2014

@DarkWarder, you can add the facebook sdk code in your template's footer file.

Then you can add a html block and paste the plugin code there i.e.

<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-width="400" data-type="button"></div>

Facebook, Twitter &amp; Instagram Combo - http://bit.ly/1h5CarP
Quote · 17 Apr 2014

 

@DarkWarder, you can add the facebook sdk code in your template's footer file.

Then you can add a html block and paste the plugin code there i.e.

<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-width="400" data-type="button"></div>

 i.e?

Quote · 17 Apr 2014

 

i.e?

 You can paste the 'div' code in the html block...

Facebook, Twitter &amp; Instagram Combo - http://bit.ly/1h5CarP
Quote · 17 Apr 2014

I get this message now

Parse error: syntax error, unexpected '<' in /home/deann/public_html/inc/classes/BxDolPageView.php(698) :
eval()'d code on line 1

and whether this ---> <div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-width="400" data-type="button"></div>

page builder or where that html block or can i put that daenos tools? i see daenos tools can put only php block
Quote · 17 Apr 2014

 

page builder or where that html block or can i put that daenos tools? i see daenos tools can put only php block

 PHP block is even better, then you won't get those parsing errors...

echo 'plugin_code';

Facebook, Twitter &amp; Instagram Combo - http://bit.ly/1h5CarP
Quote · 17 Apr 2014

He is getting the parsing error because he put straight html into a php block.

Yea, my Deanos Tools module only inserts php blocks. HTML blocks are built into dolphin. If you have problems with html being stripped using the built in html blocks then i have another module called Block Tools which can insert html blocks using raw html and will keep the html intact.

To put straight html into a php block then you need to put your html between a ending and starting php tag combo. Like so.

?>
Put your HTML here.
<?php { }

The two {} on the end may or may not be needed. Depends on server.

By starting with a closing php tag and ending with a opening php tag, you essentially turn a php block into a html block.

https://www.deanbassett.com
Quote · 17 Apr 2014

@deano - slightly off topic, but was wondering. WHen I use:

 

?>
Put your HTML here.
<?php

I get an error, but when I use:

 

?>
Put your HTML here.
<?php { }

 

then everything works. Any idea why?

caredesign.net
Quote · 17 Apr 2014

 

@deano - slightly off topic, but was wondering. WHen I use:

 

?>
Put your HTML here.
<?php

I get an error, but when I use:

 

?>
Put your HTML here.
<?php { }

 

then everything works. Any idea why?

 
No clue. Works both ways on my site. Most likely either PHP version, or level of error reporting.

Is it a error, warning or notice?

https://www.deanbassett.com
Quote · 17 Apr 2014

I get an error:


Parse error: syntax error, unexpected end of file in /home/mtsco/public_html/inc/classes/BxDolPageView.php(714) : eval()'d code on line 4

 

EDIT: this is what I have on BxDolPageView:

 


    function getBlockCode_PHP( $iBlockID, $sContent )
    {
        ob_start();
        $aResult = eval($sContent);
        $sContent = ob_get_clean();
        return !empty($aResult) ? $aResult : $sContent;
    }

caredesign.net
Quote · 17 Apr 2014

Unknown. I cannot replicate the problem on my server.

https://www.deanbassett.com
Quote · 17 Apr 2014

no biggie - I was just curious

caredesign.net
Quote · 17 Apr 2014

 

@deano - slightly off topic, but was wondering. WHen I use:

 

?>
Put your HTML here.
<?php

I get an error, but when I use:

 

?>
Put your HTML here.
<?php { }

 

then everything works. Any idea why?

 Okay i do that and no error or anything else but there is no that share button

Quote · 17 Apr 2014

did you drag the block to the Active area in the Page Builder for that page?

caredesign.net
Quote · 17 Apr 2014

 

did you drag the block to the Active area in the Page Builder for that page?

 Yes that is Active

Quote · 17 Apr 2014

should be such that what goes into the ad so you can share it on facebook.

My site is where people can put they own product sell and that share facebook but not work, so what script is right? Because no that script do this http://myyntinurkka.com/sharee.jpg

and this is script what i get

<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/fi_FI/all.js#xfbml=1&appId=774310692581891";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-type="button_count"></div>

so what is right script so can share facebook? Thanks

Quote · 18 Apr 2014

When you got the button code. you did not change the URL to share to the URL of the page you want to share.

This part of the code is wrong.

<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-type="button_count"></div>

You need to put this into a php block.

?>
<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/fi_FI/all.js#xfbml=1&appId=774310692581891";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-share-button" data-href="URL to the page you are sharing." data-type="button_count"></div>
<?php {}


Change what is in red to the proper url like the one you were trying to share in your photo which is. http://myyntinurkka.com/ads/entry/Yamaha-Agustinen-kitara

So every button you do will be different because each one will have a different url.

https://www.deanbassett.com
Quote · 18 Apr 2014

For code that will work on any page so it automatically figures out the url for you then use this code in a php block instead.


$sUrl = BX_DOL_URL_ROOT . substr($_SERVER['REQUEST_URI'], 1);
$sCode = <<<CODE
<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/fi_FI/all.js#xfbml=1&appId=774310692581891";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-share-button" data-href="{$sUrl}" data-type="button_count"></div>
CODE;
echo $sCode;

https://www.deanbassett.com
Quote · 18 Apr 2014

 

For code that will work on any page so it automatically figures out the url for you then use this code in a php block instead.


$sUrl = BX_DOL_URL_ROOT . substr($_SERVER['REQUEST_URI'], 1);
$sCode = <<<CODE
<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/fi_FI/all.js#xfbml=1&appId=774310692581891";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-share-button" data-href="{$sUrl}" data-type="button_count"></div>
CODE;
echo $sCode;

Thanks deano that work but there is no that ad photo

Quote · 18 Apr 2014

I went to that page on your site, clicked the share button, and it picked up the photo just fine.

https://www.deanbassett.com
Quote · 18 Apr 2014

Yes now work earlie coming this Myyntinurkka.con logo photo but now works fine

Thanks deano I appreciate your help very much

Quote · 18 Apr 2014

 

Yes now work earlisr coming this Myyntinurkka.con logo photo but now works fine

Thanks deano I appreciate your help very much

That happens sometimes. Facebook looks at the page and will pick a photo from it. Usually the largest one. Facebook likes large photos. The bigger, the better. FB wants photos that are 1200x630 at least.

That is generic sharing code. To force facebook to use a specific photo, desc and other things requires a lot more work.

https://www.deanbassett.com
Quote · 18 Apr 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.