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.
Navigation

Share on Facebook

Last updated on 4 years ago
C
Catzenjaeger
Posted 4 years ago
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:
                  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();
daimonbok1daimonbok1
Posted 4 years ago
That's something I would like also....
ChanChan
Posted 4 years ago
https://www.facebook.com/share.php?u=https://www.php-fusion.co.uk

It works but it's not automatic.


$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.
C
Catzenjaeger
Posted 4 years ago
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
 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();
ChanChan
Posted 4 years ago
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.
C
Catzenjaeger
Posted 4 years ago
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
djdandidjdandi
Posted 4 years ago
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
ChanChan
Posted 4 years ago
I want to know how too. :)
C
Catzenjaeger
Posted 4 years ago
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
RobiNNRobiNN
Posted 4 years ago
https://github.com/PHPFusion/PHPFusion/commit/148d7122643db5ca8d0bae7e1dcd7cfddea97126
C
Catzenjaeger
Posted 4 years ago
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?
RobiNNRobiNN
Posted 4 years ago
you must add this
 add_to_head("<meta property='og:image' content='".fusion_get_settings("siteurl").PATH_TO_YOUR_IMAGE."' />");
in your code
Edited by RobiNN on 18-10-2016 12:51, 4 years ago
C
Catzenjaeger
Posted 4 years ago
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
ChanChan
Posted 4 years ago
You tried or not Robo123 solution?
C
Catzenjaeger
Posted 4 years ago
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
RobiNNRobiNN
Posted 4 years ago
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/PHPFusion/PHPFusion/blob/9.02/infusions/news/classes/news/news.php#L550-L563
ChanChan
Posted 4 years ago

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.
Edited by Chan on 09-11-2016 04:30, 4 years ago
C
Catzenjaeger
Posted 4 years ago
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 / 78 Downloads]
djdandidjdandi
Posted 4 years ago
I have exactly the same problem. I hope that this will be fixed.
C
Catzenjaeger
Posted 4 years ago
none a solution for this? damn
its really important for me that i can post figures on my facebook channel.
You can view all discussion threads in this forum.
You cannot 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.
You cannot set up a bounty in this discussion thread.
Moderator: Support Team
Users who participated in discussion: Falk, Catzenjaeger, Chan, djdandi, RobiNN, daimonbok1,