Linkedin sharing page keeps spinning - linkedin

I’m trying to use the shareArticle API on a website for a client, whatever parameters I’m giving the share page keeps spinning, it seems to be a parsing issue but I’m not able to figure it out.I’ve also tried to use the share button API but it’s not better.
This is the URL I’m trying to share (but every URL from the site seems to be having the same issue) : http://www.urbanem.fr/formation-gestion-conflits-mediation-2/
Any idea what might be wrong?
Here’s the source code to generate the share button:
$postURLLinkedin = urlencode(home_url() . "?p=" . get_the_ID());
$linkedin_share = '<li><a class="sb-linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url='.$postURLLinkedin.'&title='.urlencode($postTitle).'&source='.urlencode(home_url()).'&summary='.urlencode($postSummary).'" onclick="javascript:window.open(this.href,\'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;" title="Partager sur Linkedin"><i class="fa fa-linkedin"></i></a></li>';

If you load the url in your linkedin profile and then make sharing works again. It's not the right thing to do but I is saving me yet.
We need a fix for this, as I pass me the same. The link you want to share are created dynamic. The share is loaded and never get to share. With all browsers I have the same problem.

I just checked and its working fine. Though I didnt share it, but I was at the last step of sharing.

Related

Wordpress site doesn’t render as expected

I decided to give wp ago, thought it would save time from writing custom html, css and js.
For the most part it has, however, how the page renders in my admin page compared to live is very different.
Because it’s rendering in admin as expected I’m finding it difficult to correct the display issues.
Has anyone else experienced this? If so, how did you resolve it?
Compare the domain name in the URL when your are logged as admin to the domain name when you are live.
If you create your WP at first time in a development URL then moves to a different server it will not be able to find CSS files what causes wrong rendering.

Article Share API from LinkedIn Throwing error

I'm trying to make a simple share button LinkedIn using the article share API. It's pretty straight foward, or so I thought.
When using the domain's href, it works:
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fsp156.prefeitura.sp.gov.br/portal
I can even make it to another page:
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fsp156.prefeitura.sp.gov.br/portal/servicos
However, if I try another page:
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fsp156.prefeitura.sp.gov.br/portal/servicos/informacao?servico=3832
It brings up a error. Looking at the console doesn't really help that much, and at the network tab all the requests return 200.
I tried removing the query parameters, although the page doesn't work without them, and still, didn't worked
#edit:
Even the LinkedIn official inspector of pages can recognize the page, now I'm really confused:
https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fsp156.prefeitura.sp.gov.br%2Fportal%2Fservicos%2Finformacao%3Fservico=3832
Anyone has idea on what's happening? Thanks in advance.
The URL you are sharing contains a ? character. You need to escape that character using URL-encoding. So, this is what you should want...
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fsp156.prefeitura.sp.gov.br%2Fportal%2Fservicos%2Finformacao%3Fservico%3D3832
Notice how the ? is rendered here as %3F. URL's should only have one ? at all, because that indicates that $_GET data is going to proceed that mark. With two of them, the server doesn't know and gets confused!
Looks good to me now!
In case you want to know more: Official LinkedIn Share Documentation
If you browse directly to the landing page of in debug mode you will see that it is returning the error 200 and not linked in.
https://sp156.prefeitura.sp.gov.br/portal/servicos/informacao?servico=3832
Ops, parece que este serviço não existe, busque um serviço na lista ao lado.
Which Google translate says is Oops, it looks like this service doesn't exist, look for a service in the list on the side.
LinkedIn has to redirect to a known good page, that is why the other two resolve.
I did notice that there is a login option on that page, is perhaps the page only accessible post login?

Wordpress code causing 404 errors

I am receiving 404 errors (showing on Google search console)that somehow relate to Facebook.
eg http://www.beerandcroissants.com/staying-in-mykonos-myconian-k-hotel/room-at-myconian-k-hotel-mykonos/%22https:/www.facebook.com/pages/Beer-and-croissants/1423705111261254
What it seems to be doing is taking one link (eg part of the whole link above) which relates to a photo on my blog and then appending the facebook page url. So, if I take the first part of the link above
(before the facebook part starts) I get a perfectly good link through to my site. If I take the second part (where the facebook link starts) then it takes me to my FB page. Again fine.
Why are these two linking together like this as it is this that seems to be causing the 404. Is it something in my settings. It's only just started happening.
Going to facebook directly and clicking on my post links takes me to the correct part of my blog.
I am not sure how to fix this. There are no broken links attached in google for me to view either. They keep happening every day. I now have 295 crawl errors and growing.
Would appreciate any help that can be given to lead me in the right direction.
I've had this as a suggestion....but don't know where to look for this code....
I'd say it may be coming from the following code on :staying-in-mykonos-myconian-k-hotel/room-at-myconian-k-hotel-mykonos/
It's also likely this is carried through the entire site.
https://www.facebook.com/pages/Beer-and-croissants/1423705111261254">
Note the " in the URL before https://www.facebook
I suggest you go through your code looking for similar issues.
Could someone please assist me if they are able.
Greatly appreciated.
thanks
Kerri

LinkedIn button shows up intermitent

I am using the code to place a linkedIn Follow button (generated here https://developer.linkedin.com/plugins/follow-company) on this page, http://new.janeirodigital.com (view Client Testimonials section). However, the buttons sometimes show up and sometimes don't.
I have read a little bit of cross domains issues that may cause this, but I am not able to find a workaround to fix this. If you visit that page in Chrome and see the errors console, you'll see a couple of errors like regarding the linked in button, like:
Unsafe Javascript attempt to access frame with URL mysite.com from frame with URL http://platform.linkedin.com/js/....Domains, protocols and ports must match.
Has anybody experienced this problem before?
Any help appreciated
Daniel
The messages you are seeing in the developer console in Chrome are unrelated to your problem. They are an artifact of the cross-domain communication and as you'll notice, you see them for Facebook and Twitter as well on the same page.
That said, viewing your page I am also seeing intermittent 403s for some of the backend calls that the FollowCompany plugin is making. I have alerted our NOC to the issue and they should be investigating now.
Reviewing your page, it seems you have done everything necessary and are set, so once we fix the operational issue you should be good to go.
My apologies for any inconvenience!
-Jeremy
I just found that this is happening when there are more than one follow button on the page, if you delete the first one and the second shows without problems but the others have the same problem...
Hope this could help your team Jeremy!!

Correct way to link to new page in canvas page app php-sdk

I'm running in to a couple of issues and wondered if anyone had any insight. I'm using the latest php-sdk I'm developing a canvas app that has a number of different steps. These steps are spread across multiple pages. Now when I first enter the app everything seems to work fine. The access token is there and I can call the api functions. On the second page (which is linked to in the same iframe) I get OAuth errors. Now if I use this on the 2nd page:
$me = $facebook->getUser();
var_dump($me);
it returns the correct user id, but I still get errors when trying to use an api query (specifically a FQL one in this instance)
Now, bear in mind these links are within the iframe so I was assuming the signed_request is getting lost somewhere, I know facebook normally issues this via a POST. If I set all my links to target="_parent" with a url such as http://apps.facebook.com/myapp/page2.php then everything works fine. Facebook clearly posts the correct info this time. Subsequently, then when I use links that only redirect the iframe it seems to work fine again (implying a cookie is being set somewhere).
Now I've seen other apps that don't have a target="_parent" that seem to work correctly, only ever loading the iframe on subsequent clicks and not the full facebook site. So I can only assume they are storing this info somewhere. I've tried to inspect these apps using httpfox but I can't see anything obvious. Does anyone have any links for best practice with multiple page apps? I know I can get around this using full urls and target="_blank" but I would like to know what's going on here. I've looked through the developer docs and the canvas page examples, but there's nothing obvious to me.
Any help or info would be appreciated
Many Thanks
There is some ways to achieve this
using Facebook JavaScript SDK (which will set cookie for you, so PHP-SDK can rely on it)
issuing POST request to your pages including signed_request from initial page loaded in canvas

Resources