To post an Update on LinkedIn via your application, that is being built with Play 2.3.x, follow these steps ( this post summarizes the work done step by step).
1) Create a LinkedIn app (if you do not have one already)
Click here – LinkedIn’s Developer Quick Start Guide and create an app. Enter all the details including Site URL. The Site URL could be something like http://www.example.com (but it should be a valid site URL). Also, select the rw_nus setting under the OAuth User Agreement section (otherwise you wont be able to post updates on LinkedIn).
Once you have saved this app, you will get API Key & Secret Key. Take a note of this API Key & Secret Key. We would use them in our code.
2) If you are using Play, then add the API Key, Secret Key & Context URL(Callback URL) in application.conf file.
3) Download a LinkedIn login image from linkedin.png & save it in “public/images” folder of app
4) Add following dependency in build.sbt (or Build.scala for Play 2.1.x or older versions)
5) Add following to routes file in conf folder
6) Let us now create LinkedInAPIController.scala to configure API Key, Secret Key and Callback URL . We would also use this scala file to request access token from LinkedIn & post an update on LinkedIn.
7) Now let us create a template redirectMain.scala.html which would show status of clicking “Share on LinkedIn” link.
So, this is how we can post updates on LinkedIn via Scribe using Scala & Play.
Reblogged this on Play!ng with Scala and commented:
LinkedIn via Scribe using Scala & Play.
Now Linkedin deprecated rw_nuns, instead of this used w_share check this for more info
https://developer.linkedin.com/support/developer-program-transition