Topic-icon JlinkedShare Module + Domain Name

Active Subscriptions:

None
14 years 4 months ago #18895 by Walker
This is a weird one, but it obviously has to do with how LinkedIn sees my domain.

When using mydomain.com the JLinkedShare module shows facebook, twitter, g+ only (all are selected) in the module options)
However, when visiting the site was www.mydomain.com the JlinkedShare Module shows facebook, twitter, g+ AND linkedIn share box...

What the?

Alzandar - happy to PM you the domain if you need to take a look, just don't want to make it public as site is still under dev.

Thanks for any suggestions...

MW
The topic has been locked.
Support Specialist
14 years 4 months ago #18941 by alzander
No need to PM the domain. This is an issue with LinkedIn being very picky with it's widgets. When you created your LinkedIn application, you gave it a Javascript URL. That URL for your site was with the www in it. That means that the social widgets will only work that very specific URL.

The LinkedIn Share button actually doesn't require an API key, but if one is provided, it goes into that restricted mode. All the other widgets (Company Profile, Member Profile, etc) as well as authentication do require the key though. I'm assuming you need one of these functions.. in that case you'll need to setup a redirect on your site from the non-www version to always go to the www version. If you're using an .htaccess file on your (Linux) server, you can add the following code toward the top (after the RewriteEngine On setting):
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Hope that helps, but if not, let us know!

Alex
The topic has been locked.