Angularjs and Linkedin share -


i have angularjs website contains several articles.

i want users able share articles through various social networks.

i'm using angularjs plugin called angularjs-socialshare. basically, system makes call sharing endpoint providing url shared:

e.g.

http://www.linkedin.com/sharearticle?mini=true&url=http://www.google.com

now, since content loaded dynamically through angularjs, show {{ description }} , {{ title }}

to solve problem, have phantomjs server executes javascript , serves static html page bots. htaccess i'm using tell bots requests (btw tips here welcome well).

options +followsymlinks rewriteengine on rewritecond %{request_uri} !\.(gif|jpg|png|ico|ico)$ rewritecond %{query_string} ^_escaped_fragment_=/?(.*)$ [or] rewritecond %{http_user_agent} ^.*pinterest.*$ [or] rewritecond %{http_user_agent} ^.*linkedin.*$ [or] rewritecond %{http_user_agent} ^.*slack.*$ [or] rewritecond %{http_user_agent} ^.*facebook.*$ [or] rewritecond %{http_user_agent} ^.*google.*$ [or] rewritecond %{http_user_agent} ^.*yahoo.*$ [or] rewritecond %{http_user_agent} ^.*bing.*$ rewriterule ^(.*)$ http://localhost:27366/$1 [p,l] 

the http://localhost:27366/$1 phantomjs server.

now, facebook , google both work fine. linkedin though doesn't, either remains stuck on loading, or displays url of page. tried looking documentation, every answer referring old docs (which 404s ) , i'm lost.

edit:

sorry, realized question didn't make sense after re-reading after while. edited.

i wrote question out of little frustration, realize should try contact works @ linkedin understand what's going on.

if ever find solution i'll make sure update here future reference

after digging , fighting support centers, found out services (like linkedin, there others) not work hashbang.

i fixed problem switching html5 mode (which removes hashbang).

.config(function ($locationprovider) {     if(window.history && window.history.pushstate){ // checks if browser has html5 support         $locationprovider.html5mode(true);     } } 

and in head of index page:

<base href="/"> 

hope helps someone


Comments