Marco Ro Posted April 9, 2018 Share Posted April 9, 2018 Hi, @Macrura, thank you. Yes this was te first things that i did, I setup well the meta tag, indeed when share the link on social I can see all information uploaded correctly. The problem is only using the modulo. Hi @Soma, thank you for reapply me. I link this method, but when I try to use the options array show up an alert message that says: Error: Call to a member function httpUrl() I try to use a different array like call just: "media" => $page->my_field but anyway give ma beck a Error: Call to a member function render() Link to comment Share on other sites More sharing options...
Soma Posted April 9, 2018 Author Share Posted April 9, 2018 1 hour ago, MarcoPLY said: Hi, @Macrura, thank you. Yes this was te first things that i did, I setup well the meta tag, indeed when share the link on social I can see all information uploaded correctly. The problem is only using the modulo. Hi @Soma, thank you for reapply me. I link this method, but when I try to use the options array show up an alert message that says: Error: Call to a member function httpUrl() I try to use a different array like call just: "media" => $page->my_field but anyway give ma beck a Error: Call to a member function render() It depends on your image field. If it's multiple you need to select one first. ie $page->images->first->httpUrl(): 1 Link to comment Share on other sites More sharing options...
Marco Ro Posted April 9, 2018 Share Posted April 9, 2018 Thank you @Soma for the good tips. ok so, now if I use this: "media" => $_SERVER['HTTP_HOST'].$page->image_card now when I inspector the pop box in the src tag I can see the correct link on the image. I think when I will go online I will see the image. Link to comment Share on other sites More sharing options...
Marco Ro Posted May 3, 2018 Share Posted May 3, 2018 Hi, When I share on (eg) Facebook, after the click on the icon it's open a windows like this one: And only if i click many times on the Share Button that load the image and description. why this happen? is there anything I can do to make the window with img and text load immediately after click on the icon? Link to comment Share on other sites More sharing options...
Soma Posted May 3, 2018 Author Share Posted May 3, 2018 44 minutes ago, MarcoPLY said: Hi, When I share on (eg) Facebook, after the click on the icon it's open a windows like this one: And only if i click many times on the Share Button that load the image and description. why this happen? is there anything I can do to make the window with img and text load immediately after click on the icon? Ask Facebook. As far as I understand it, it's because FB caches the data and on first call it sometimes doesn't show in the dialog (but when posted or shared again the same url). Link to comment Share on other sites More sharing options...
Marco Ro Posted May 3, 2018 Share Posted May 3, 2018 ok understand. so this is something new, I had seen on other sites this module work well. How did you solve for your sites now? I mean, you keep use this modules or add the facebook share button? Link to comment Share on other sites More sharing options...
Soma Posted May 3, 2018 Author Share Posted May 3, 2018 I'm not sure, but this has always been like this not something new. However, maybe you have an example of that so we can take a look at? Also maybe this is of interest: https://developers.facebook.com/tools/debug/ Link to comment Share on other sites More sharing options...
Marco Ro Posted May 3, 2018 Share Posted May 3, 2018 I saw only these: Here there are 3, that works so well. I will like let it works like these. here on more. Link to comment Share on other sites More sharing options...
Soma Posted May 3, 2018 Author Share Posted May 3, 2018 Yeah nice they works so well. But doesn't help why yours isn't.... So do you have a link to yours or not? Otherwise I can't try to help. Link to comment Share on other sites More sharing options...
Soma Posted May 3, 2018 Author Share Posted May 3, 2018 Thanks for the link. I looked at it and it's clear why it's not working. You're not only sharing the url but a lot more like title and text. Have you modified the config for Facebook? This is the share link: https://www.facebook.com/sharer/sharer.php?url=https%3A%2F%2Fwww.playwood.it%3A443%2Fplaywood%2Fen%2Fblog%2Fitaly-is-a-door-the-design-is-the-key-4-9th-april-fuorisalone-zona-lambrate-milano%2F&title=Italy is a door. The design is the key | 4-9th April%2C Fuorisalone – Zona Lambrate%2C Milano&text=PlayWood will be present at Fuorisalone 2017%2C presenting an innovative product that allows you to join different panels of any material to create furniture and modular structures. The PlayWood connector has been thought for temporary spaces%2C… Facebook only allows for an url. Facebook then parses the url and gets the content from your og tags on the page. Link to comment Share on other sites More sharing options...
Marco Ro Posted May 3, 2018 Share Posted May 3, 2018 yes I have add title and text, sorry. now I have delete it and let only ?url={url} but not change. I had added those tags to prove if they were needed. But even without works in the same way. Link to comment Share on other sites More sharing options...
Soma Posted May 3, 2018 Author Share Posted May 3, 2018 9 minutes ago, MarcoPLY said: yes I have add title and text, sorry. now I have delete it and let only ?url={url} but not change. I had added those tags to prove if they were needed. But even without works in the same way. It's ?u= not ?url= 1 Link to comment Share on other sites More sharing options...
LAPS Posted June 29, 2018 Share Posted June 29, 2018 Hi @Soma, thanks for the module! See UPDATEs below. I'm using ProcessWire 3.0.98 and the CSS styling seems not to work even if the CSS classes are added to the HTML source code. That is, I get the following: However, in the module configuration page, the preview looks good: UPDATE - By inspecting the CSS code I just discovered unwanted style properties added to the page (note: the CSS that the MSSB module would add is still not loaded): I don't know why it happens and probably it's not directly related to MSSB, but it would be great if anyone can help. ? SOLVED - I just discovered I should had been including the theme.css file present in the MSSB theme folder to my site. That is, to use: <link rel="stylesheet" type="text/css" href="path/to/theme.css" /> Alternatively, I should had been adding the CSS statements in my website CSS file. Link to comment Share on other sites More sharing options...
adrian Posted August 29, 2018 Share Posted August 29, 2018 Hey @Soma - I just noticed a bug with overriding options. This is my $options array: $options = array( "theme" => "templates/social_themes/ms2s", "outer_wrapper_tag" => "span", "item_wrapper_tag" => "span style='float:left' ", "text" => $page->share_email_text, "char_limit" => 9999 ); However, the char_limit isn't being respected. The problem is these lines: https://github.com/somatonic/MarkupSocialShareButtons/blob/7b25cf4098a23ab79ea423082ecd200bc7a06590/MarkupSocialShareButtons.module#L381 https://github.com/somatonic/MarkupSocialShareButtons/blob/7b25cf4098a23ab79ea423082ecd200bc7a06590/MarkupSocialShareButtons.module#L402 $this->char_limit and $this->char_limit_sypnosis need to be $this->options['char_limit'] and $this->options['char_limit_synopsis'] respectively. Thanks! Link to comment Share on other sites More sharing options...
adrian Posted August 29, 2018 Share Posted August 29, 2018 Looks like there are lots of other issues along the same lines. So far I have also come across trying to set the "twitter_params" option. It is not sticking because this line: $params = $this->get($item . "_params"); needs to be: $params = $this->options[$item . "_params"]; but there are lots of other instances like this as well that I think need changing. Thanks again. 1 Link to comment Share on other sites More sharing options...
Soma Posted August 30, 2018 Author Share Posted August 30, 2018 Thanks @adrian I think I got it sorted out. New version 1.0.4 is pushed. 3 Link to comment Share on other sites More sharing options...
adrian Posted August 30, 2018 Share Posted August 30, 2018 Thanks @Soma - so far that looks to be working as expected. Link to comment Share on other sites More sharing options...
tarkvsg Posted February 19, 2019 Share Posted February 19, 2019 Hi, Soma! Thanks for cool module! I use version 1.0.4 & php 7.0 and this is my problem. I have needed to add some new social networks. By you instruction I added some array in $config->MarkupSocialShareButtonsServices variable, but saw nothing. Because in __construct(): Quote isset($this->config->MarkupSocialShareButtonsServices) == false i make some tests: Quote empty($this->config->MarkupSocialShareButtonsServices) == true is_null($this->config->MarkupSocialShareButtonsServices) == false echo $this->config->MarkupSocialShareButtonsServices - print right array what do you think about? tnx Link to comment Share on other sites More sharing options...
Krlos Posted May 26, 2020 Share Posted May 26, 2020 Hi, Is it possible to add share on WhatsApp? Link to comment Share on other sites More sharing options...
Krlos Posted May 26, 2020 Share Posted May 26, 2020 I made it work with the instructions in Github. $config->MarkupSocialShareButtonsServices = array( "example" => array( "example_url" => "http://exampleurl.com/", "example_params" => "?url={url}&description={text}", "example_icon" => "<img src='{themeUrl}png/example.png'>", ) ); Using: https://api.whatsapp.com/send?text={url} Thank you! 2 Link to comment Share on other sites More sharing options...
froot Posted March 5, 2022 Share Posted March 5, 2022 nice module. Could you also make it possible to just copy the current url? What I mean is add another button that when clicked copies the current url to the clipboard. I'm trying to accomplish that with the current options of the module but no luck. Maybe if I could hook the function before rendering there would be a chance… 1 Link to comment Share on other sites More sharing options...
froot Posted March 7, 2022 Share Posted March 7, 2022 also, sharing via facebook is not embedding the image. It seems to work fine with twitter and linkedin but not facebook. I'm using the module MarkupSEO to declare the social media image. When simply sharing the page-url on social media platforms manually, it seems to work fine, so that module doesn't seem to be the problem. However, I added <meta property="og:image:url" content="<?php echo 'http://'.$_SERVER['HTTP_HOST'].$page->poster->url; ?>" /> (as suggested further up) in case that's required for fb because the MarkupSEO-module doesn't provide that tag. Doesn't help though. And then also, I do not quite understand what the following means ?u={url}&title={title}&text={text}&media={media} these are placeholders? what goes in here for real? Lastly, I should mention that on the page itself, the image is not displayed, i.e. not included in the <body>, because it would be redundant with an embedded iframe on the page, so we left it out. Don't know if that's the issue. Thanks for help! Link to comment Share on other sites More sharing options...
aagd Posted March 7, 2022 Share Posted March 7, 2022 @fruid If your image URL is showing up normally in the meta tags, maybe the FB sharing cache got stuck. If FB has already cached the page, they might not parse it again anytime soon. But you could try resetting the cache at https://developers.facebook.com/tools/debug/sharing/batch/ . Enter your page URLs there and try again... Link to comment Share on other sites More sharing options...
Flashmaster82 Posted September 29, 2023 Share Posted September 29, 2023 Twitter seems not to be working at sharing? i use this ?url={url}&text={ingress} Link to comment Share on other sites More sharing options...
DrewPH Posted 6 hours ago Share Posted 6 hours ago (edited) Installation is causing a fatal error. Screenshot attached. Running ProcessWire latest master. Any thoughts? Any alternatives? Thanks in advance. Back on the modules page, I see this: (second screenshot) Edited 6 hours ago by DrewPH Adding 2nd screenshot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now