title: how to post content using javascript in linkedin
body: <p>I have to login and post content in linkedin using javascript.
      Using below code i have login successfully and when i have posted i got below error in firebug .</p>
  
  <p>NetworkError: 403 Forbidden - <a href="https://api.linkedin.com/v1/people/~/mailbox" rel="nofollow">https://api.linkedin.com/v1/people/~/mailbox</a></p>
  
  <p>I need to post content in wall.</p>
  
  <p>what is the issue in below code</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://platform.linkedin.com/in.js"&gt; 
      api_key: xxxxxxx
      onLoad: onLinkedInAuth
      scope: r_network w_messages
      authorize: true
       &lt;/script&gt;
  
       &lt;script type="text/javascript"&gt;
  
       function onLinkedInLoad() {
  
           IN.Event.on(IN, "auth", onLinkedInAuth);
       } 
  
       function onLinkedInAuth() {
  
          var div = document.getElementById("sendMessageForm");
  
           div.innerHTML = '&lt;h2&gt;Send a Message To Yourself&lt;/h2&gt;';
           div.innerHTML += '&lt;form action="javascript:SendMessage();"&gt;' +
                       '&lt;input id="message" size="30" value="You are awesome!" type="text"&gt;' +
                        '&lt;input type="submit" value="Send Message!" /&gt;&lt;/form&gt;';
       }
  
       function SendMessage(keywords) {
  
  
           var message = document.getElementById('message').value; 
         var BODY = {
              "recipients": {
                 "values": [{
                  "person": {
                     "_path": "/people/~",
                  }
                }]
               },
            "subject": "JSON POST from JSAPI",
           "body": message
          }
  
           IN.API.Raw("/people/~/mailbox")
                 .method("POST")
                 .body(JSON.stringify(BODY)) 
                 .result(displayMessageSent)
                 .error(function error(e) { alert ("No dice") });
       }
  
       function displayMessageSent() {
           var div = document.getElementById("sendMessageResult");
            div.innerHTML += "Yay!";
       }
  
       &lt;/script&gt;
       &lt;/head&gt;
       &lt;body&gt;
       &lt;script type="IN/Login"&gt;&lt;/script&gt;
       &lt;div id="sendMessageForm"&gt;&lt;/div&gt;
       &lt;div id="sendMessageResult"&gt;&lt;/div&gt;
  </code></pre>