title: Send a message to a friend, I wonder Javascript API
body: <p>I am a developer from the Republic of Korea.<br></p>
  
  <p>I am currently making Facebook and Twitter-based websites.<br></p>
  
  <p>I want to use a JavaScript API that can send message to friends,<br></p>
  
  <p>So I consulted the <code>iframe</code> Javascript API methods or using Facebook page looked as sending.<br></p>
  
  <p>I wonder,</p>
  
  <p>I use to send messages to friends as a Javascript API that provides a?<br></p>
  
  <p>I do not know English well. So I used Google translator. <br></p>
  
  <p>Please understand.</p>
  
  <p><code>(Edited, fixed some grammar and  rewording)</code></p>
  
  <pre class="lang-js prettyprint-override"><code>FB.api (path, "post", {
  
          message: msg,
  
          caption: "caption caption",
  
          link: "http://www.naver.com",
  
          description: "Description Description",
  
          picture: "http://sstatic.naver.net/search/img3/h1_naver.gif",
  
          tag: "Tag",
  
          name: "name names",
  
          access_token: accessToken
  
          }, Function (response) {
  
          if (! response | | response.error){
  
              alert ("error");
  
          }
  
          else{
  
              alert (response.id);
  
          }
  
      })
  </code></pre>