Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Share on Facebook

i have found in a ols booklib infusion a facebook / social Sharing snipplet.
I have build in it on my pagebut it dosent work correct

images will not be shown and the links goning to a error page (page not found)
I have google for a solution but give up . I have also try all known infusions and panels but none will work in PHP F 9.
can anyone help? i found a facebook developer page but sorry i understand that https://developers.facebook.com/docs/...are-button

here my code:
CodeDownload  
                  openside("<div class='well clearfix'><strong>SOCIAL SHARING</strong></div>");
         $settings = fusion_get_settings();                  
                     echo "<div style='text-align:center'>\n";
                     $link = $settings['siteurl'].str_replace("../","",INFUSIONS)."figurelib/figure.php?figure_id=".$_GET['figure_id'];
                     echo "<a href='http://www.facebook.com/share.php?u=".$link."' target='_blank'><img alt='Facebook' src='".INFUSIONS."figurelib/images/facebook.png' border='0'></a>&nbsp;\n";
                     echo "<a href='http://twitter.com/share?url=".$link."' target='_blank'><img alt='Twitter' src='".INFUSIONS."figurelib/images/twitter.png' border='0'></a>&nbsp;\n";
                     echo "<a href='http://digg.com/submit?url=".$link."' target='_blank'><img alt='Digg' src='".INFUSIONS."figurelib/images/digg.png' border='0'></a>&nbsp;\n";
                     echo "<a href='http://reddit.com/submit?url=".$link."' target='_blank'><img alt='Reddit' src='".INFUSIONS."figurelib/images/reddit.png' border='0'></a>&nbsp;\n";
                     echo "<a href='http://del.icio.us/post?url=".$link."' target='_blank'><img alt='Del.icio.us' src='".INFUSIONS."figurelib/images/delicious.png' border='0'></a>&nbsp;\n";
                     echo "</div>\n";
                  closeside();

That's something I would like also....
https://www.facebook.com/share.php?u=https://www.php-fusion.co.uk

It works but it's not automatic.

CodeDownload  

$link = $settings['siteurl'].str_replace("../","",INFUSIONS)."figurelib/figure.php?figure_id=".$_GET['figure_id'];                   
print_p($link);

openside('something');
echo 'your html content';
closeside();




In your panel, Make sure your link is correct.
dont understand that .. my link is correct

here is one link:
http://aliencollectors.com/site/infusions/figurelib/figures.php?figure_id=66

and this is my social sharing code but it dosent work
CodeDownload  
 openside("<div class='well clearfix'><strong>SOCIAL SHARING</strong></div>");
         $settings = fusion_get_settings();                 
                     echo "<div style='text-align:center'>\n";
                     $link = $settings['siteurl'].str_replace("../","",INFUSIONS)."figurelib/figure.php?figure_id=".$_GET['figure_id'];
                     echo "<a href='http://www.facebook.com/share.php?u=".$link."' target='_blank'><img alt='Facebook' src='".INFUSIONS."figurelib/images/facebook.png' border='0'></a>&nbsp;\n";
                     echo "<a href='http://twitter.com/share?url=".$link."' target='_blank'><img alt='Twitter' src='".INFUSIONS."figurelib/images/twitter.png' border='0'></a>&nbsp;\n";
                     echo "<a href='http://digg.com/submit?url=".$link."' target='_blank'><img alt='Digg' src='".INFUSIONS."figurelib/images/digg.png' border='0'></a>&nbsp;\n";
                     echo "<a href='http://reddit.com/submit?url=".$link."' target='_blank'><img alt='Reddit' src='".INFUSIONS."figurelib/images/reddit.png' border='0'></a>&nbsp;\n";
                     echo "<a href='http://del.icio.us/post?url=".$link."' target='_blank'><img alt='Del.icio.us' src='".INFUSIONS."figurelib/images/delicious.png' border='0'></a>&nbsp;\n";
                     echo "</div>\n";
                  closeside();

Copy your link.

Copy my link.
https://www.facebook.com/share.php?u=https://www.php-fusion.co.uk <--- click this and confirm it is working.

Paste both into notepad, see the result and compare.

You need to login to facebook when doing it.
hmn

my link when i use share button: https://www.facebook.com/share.php?u=http://aliencollectors.com/site/infusions/figurelib/figures.php?figure_id=396

your link: https://www.facebook.com/share.php?u=https://www.php-fusion.co.uk

but i see only my site logo and not the figure himself. That is my problem. I guess some of code are wrong .. as example: http://news.toyark.com/category/aliens-and-predator-toy-news
when i use here the sahre button it will be postet correct with corect images from figures ... on my site not
Hi, for some time I have the same problem. All nicely made available without proper image attached to the news or to another part of the page. If anyone knows the solution please share. For all nicely presented the matter.
http://news.toyark.com/category/aliens-and-predator-toy-news
I want to know how too. :)
lunch breack.. shot time to write something ...

solution here but i dont understand all: https://developers.facebook.com/docs/...ers#markup
guess here is open graph misisng or ahtever

here can you debug it: https://developers.facebook.com/tools...ols/debug/
my link to test: http://aliencollectors.com/site/infus...ure_id=392

facebook find only my logo but none other images. this must be fixed .. its important that user see the image to my figure/articke or wahteve and not the sh... loge all times.

but this is to heavy for me -- i have found no solution for this ..sad
https://github.com/php-fusion/PHP-Fusion/commit/148d7122643db5ca8d0bae7e1dcd7cfddea97126
hmnn but my image from my figure it dosnet show ... i see always only my sitelogo ...thts my problem. I want to show pics from this site what i like to share .. it must be possible but how?
you must add this
CodeDownload  
 add_to_head("<meta property='og:image' content='".fusion_get_settings("siteurl").PATH_TO_YOUR_IMAGE."' />");

in your code
CodeDownload  
openside("<div class='well clearfix'><strong>SOCIAL SHARING</strong></div>");
         $settings = fusion_get_settings();                 
                     echo "<div style='text-align:center'>\n";
                     $link = $settings['siteurl'].str_replace("../","",INFUSIONS)."figurelib/figure.php?figure_id=".$_GET['figure_id'];
                     echo "<a href='http://www.facebook.com/share.php?u=".$link."' target='_blank'><img alt='Facebook' src='".INFUSIONS."figurelib/images/facebook.png' border='0'></a>&nbsp;\n";                 
                     echo "</div>\n";
                  closeside();



thats for my facebook ... but the images a re never the same it must be automatic and not static. Facebook grab a image from my site (at tne oemtn my banner/logo) but it is possible , htat FB grab the right image from this site what waht i like to share
You tried or not Robo123 solution?
this is not the problem ... i cant add a static image ... i want share a active image from thbis site was i have open.
I have seen the facebook api and where i saw a solution but im not a good coder and so i can iplant it.

guess too it is a open graph problem https://developers.facebook.com/docs/sharing/opengraph
can anyone help?
on all pages what i share i see only my site banner but the right image from my site (as example ... when i open a figure in my figuredatabase and share it on facebook i want to show not my sitelogo .. i want show the image from my figure)

but someone is wrong
CodeDownload  
add_to_head("<meta property='og:image' content='".fusion_get_settings("siteurl").PATH_TO_YOUR_IMAGE."' />");


PATH_TO_YOUR_IMAGE replace to image from database
https://github.com/php-fusion/PHP-Fusion/blob/9.02/infusions/news/classes/news/news.php#L550-L563

Quote

but someone is wrong

Maybe :D

Joke aside, Facebook integration could be made into a function. I'd make a facebook KIT for the fans out there later.

I have a function that will get all users to like your item whenever they log in. These are how people get 1million likes in certain items btw. So much for "log in with facebook" account. Thats where it all happens - discreet auto liking.

Is FB important to a CMS? No. Last I want to make our software a tool for FB or any social sites integration. Just telling where I stand in this 'share' thing.
Social network is very important. I need a possibility that I to every page I share also the corresponding data and the pictures exactly this page with. This must work ... just how? I do not know the API. On ebay or other pages (Toyark) ... when I click on Share there ... I see exactly this article and not a page banner or general information.

here example: http://news.toyark.com/category/aliens-and-predator-toy-news
click on share you see this:
www.php-fusion.co.uk/infusions/forum/attachments/unbenannt_14.jpg

when i share a article on my site when i see only always the same information --- my sitebanner and my url
Catzenjaeger attached the following file:
unbenannt_14.jpg [75.36kB / 49 Downloads]
I have exactly the same problem. I hope that this will be fixed.
none a solution for this? damn
its really important for me that i can post figures on my facebook channel.
Thread Information
Author
Replies
42 posts
Views
7,040 times
Last Post
Last updated on 3 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, Catzenjaeger, Chan, djdandi, RobiNN, daimonbok1