title: I need help to make FB.api() call in Synchronous Mode
body: <p>I am facing a problem with runing FB.api in a for loop.</p>
  
  <pre><code>for(var i = 0; i &lt; commentObjectLength; i++){
      var fbFeedID = commentObject.OwnCommentList[i].fbFeedID;
      var OwnCommentID = commentObject.OwnCommentList[i].OwnCommentID;
      var accessToken = commentObject.OwnCommentList[i].accessToken;
      var commentText = commentObject.OwnCommentList[i].commentText;
      alert("Hiii"); //  &gt;&gt;&gt;&gt;&gt;&gt;&gt;1
  
      FB.api('/' + fbFeedID + '/comments', 'post', {
              message: commentText,
              access_token : accessToken
          }, function (response) {
              if (!response || response.error){
                  //alert(response.error.message);
              } else {
                  alert("Hello"); //  &gt;&gt;&gt;&gt;&gt;&gt;&gt;2
                  alert(response.id); //  &gt;&gt;&gt;&gt;&gt;&gt;&gt;3
              }
          });
  }
  </code></pre>
  
  <p>Now to tell in simple way.<br>
  I am expecting out in alert like<br>
  1-> Hiii<br>
  2-> Hello<br>
  3-> some response id<br>
  4-> Hiii<br>
  5-> Hello<br>
  6-> some resonse id  </p>
  
  <p>But in reality I am getting out like<br>
  1-> Hiii<br>
  2-> Hiii<br>
  3-> Hiii  </p>
  
  <p>continues till loop size<br>
  8-> Hello<br>
  9-> some response id<br>
  10-> Hello<br>
  11-> some response id continues  </p>
  
  <p>Problem is all time the last date of loop will go to Facebook and comment on feed. Not separately.</p>
  
  <p>So please any one help me solve this issue. I am struggling a lot.<br>
  (Hope every one can understand problem, anything extra info needed please ask)</p>