BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> openElement General Discussion
  New Posts New Posts RSS Feed - Facebook  & LinkedIn share
  FAQ FAQ  Forum Search   Register Register  Login Login

Facebook & LinkedIn share

 Post Reply Post Reply Page  12>
Author
Message
WattJet View Drop Down
Senior Member
Senior Member
Avatar

Joined: Jan 04 2016
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote WattJet Quote  Post ReplyReply Direct Link To This Post Topic: Facebook & LinkedIn share
    Posted: Jun 22 2020 at 7:12pm
Hi,  I want to periodically share entries/posts etc with Social Media (Facebook, LinkedIn etc)
My website has short entries/posts that I would be interested in making shareable through a share button.

I read the entries on Facebook of this forum (July 2018), refer ways by which the button will lead to the facebook site, but I would be interested that the link leads to the user's feed in facebook ( or Linkedin).

In the sensode black template, I  tried to use a share button HTML to two articles of my site.
The URLs of the articles in my site are:

https://-------------------.com/actualites.htm#news1
https://-------------------.com/actualites.htm#news2


FACEBOOK
I used this html code added to the link of the button element

https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2F------------------.com%2Factualites.htm%23news1

https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2F----------------.com%2Factualites.htm%23news2

This one seems to work well for both links



LINKEDIN
 I first used this html code added to the link of the button element
"https://www.linkedin.com/shareArticle?mini=true&url=https://-------------.com/actualites.htm#newsXX&title=&summary=--------------? &source="

I do not get an error message, but LinkedIn does not seem to accept it (I get the "ooops, it's us, try again later", but it happened for two days now, so I imagine it does not really work)


Then, I tried with this other
http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2F--------------.com%2Factualites.htm%23news1&title=%20xxxxxx%20xxxxxx%20xxxxxxx%3F

http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2F----------------------.com%2Factualites.htm%23news2&title=yyyy%20yyyyyy%20yyyyyy%20yyyyyy%3F

And LinkedIn tries always to publish #1 instead of #2.
I have cleared the cache of my PC several times, I have verified that there is no mistake in the links...the first news has a link#1, the second has a link to #2, both have different titles, but it clicking on #2 makes LinkedIn go to #1



As an alternative, according to LinkedIn, the script to use is
"<script src="https://platform.linkedin.com/in.js" type="text/javascript">lang: en_US</script>
<script type="IN/Share" data-url="https://www.linkedin.com"></script>"

How do I add this to a LinkedIn button? ... and would there be a similar procedure for a facebook button?

Any guidance in any of the above will be welcome


Edited by WattJet - Jun 22 2020 at 9:02pm
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 22 2020 at 8:39pm
You are following instructions from this page: https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/plugins/share-plugin

Put their instructions into a Code Block Visual that you install at your preferred location:


Just make sure to change the data-url for your own 
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 22 2020 at 9:02pm
Fr FB use https://developers.facebook.com/docs/plugins/share-button/?locale=en_us# instructions

Put the Javascript SDK into an HTML code block in Start Body position once for the page

Put the second piece of code in a visual code block
Back to Top
WattJet View Drop Down
Senior Member
Senior Member
Avatar

Joined: Jan 04 2016
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote WattJet Quote  Post ReplyReply Direct Link To This Post Posted: Jun 22 2020 at 9:38pm
Hi Hobby001

Thanks again for all your help

For the LinkedIn,  I followed your instructions, and it does include the visual code in the page, but I cannot match it with the image for LinkedIn that I have ( I do not know how to do it) I searched the doc for the block, and it shows  what  I see, but not how to match it with an image element.

The example of the french page that you include only applies to facebook and it is applied to a text, not to an image

Regarding Facebook, I modified the script and it works (I was editing my original message when you answered me), so for the time being it is solved. I will see to do it after completing the LinkedIn one -that seems more simple since there is only one code block to do -.
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (1) Thanks(1)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 23 2020 at 2:03am
I have no clue on how LinkedIn operates
Back to Top
WattJet View Drop Down
Senior Member
Senior Member
Avatar

Joined: Jan 04 2016
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote WattJet Quote  Post ReplyReply Direct Link To This Post Posted: Jun 23 2020 at 2:54pm
Thanks for getting back.

Let me rephrase the question:

I have the Code Block Visual with the script that I installed at a specific location in the page.

I want to use an image to click on to activate that Code Block Visual.

The question is how do I make the script run by clicking on an image (in the same way that the element image can have a link that is activated when click over.


Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (1) Thanks(1)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 23 2020 at 5:31pm
The text block comes from LinkedIn directly you should ask them if there is any possibility

Edited by Hobby001 - Jun 23 2020 at 5:32pm
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 23 2020 at 6:08pm
You can try this:  

Select your preferred image and add it to your project trough the Ressources pannel and use it to publish the image on your host.

Then modify the following code accordingly

<a href="https://www.linkedin.com/sharing/share-offsite/?url=https://www.denislafrance.net/TestPage.htm"target="_blank" title="Share on LinkedIn">
<img src="Files/Image/LinkedIn.jpg" width="30" height="30">
</a>

And replace the code Block (visual) content with it




Edited by Hobby001 - Jun 23 2020 at 6:09pm
Back to Top
WattJet View Drop Down
Senior Member
Senior Member
Avatar

Joined: Jan 04 2016
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote WattJet Quote  Post ReplyReply Direct Link To This Post Posted: Jun 23 2020 at 7:59pm
Thank you so much for this Hobby1!
Back to Top
WattJet View Drop Down
Senior Member
Senior Member
Avatar

Joined: Jan 04 2016
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote WattJet Quote  Post ReplyReply Direct Link To This Post Posted: Jun 23 2020 at 11:06pm
Hi again,

I saw I tried the link in denislafrance.net page. and it works well
When I pass the mouse over the link, I can see that it is pointing to https://www.linkedin.com/sharing/share-offsite/?url=https://www.denislafrance.net/TestPage.htm and that the sharing with LinkedIn works

However, when I introduce mine it does not work.

When I add to the link element  the URL, it loses the "//" and then it does not work

So, this is what I add:
https://www.linkedin.com/sharing/share-offsite/?url=https://www.-------------.com/actualites.htm

...and this is what appears:
https://www.linkedin.com/sharing/share-offsite/?url=https:www.----------------.com/actualites.htm

and as a result, the link  and share does not work





Edited by WattJet - Jun 23 2020 at 11:07pm
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.