Na swojej stronie dodałem fb:comments
  1. <fb:comments href="http://link.pl/artykul,158,tytul-linka.html" num_posts="10" width="524"></fb:comments>

I chciałbym za pomocą swojego konta publikować komentarze w tym boksie, tak jak to mogę robić z publikacją na tablicy, ale nie mam pomysłu jak się za to zabrać


Tak umieszczam wpisy na tablicy
  1. $facebook = new class_Facebook(array(
  2. 'appId' => FB_ID,
  3. 'secret' => FB_SECRET,
  4. 'cookie' => false,
  5. ));
  6. $session = $facebook->getSession();
  7. $token = $facebook->getAccessToken();
  8.  
  9.  
  10.  
  11. $feed = array(
  12. 'access_token' => $token,
  13. 'username' => 'uuuu',
  14. 'name' => 'hhh',
  15. 'description' => 'gggg',
  16. );
  17.  
  18.  
  19. $aTemp = array();
  20. foreach ($feed as $sKey=>$sValue){
  21. $aTemp[]=$sKey.'='.$sValue;
  22. }
  23. $postFields = implode('&',$aTemp);
  24. try {
  25. $url = "https://graph.facebook.com/".$sUserId."/feed";
  26. $ch = curl_init();
  27. curl_setopt($ch, CURLOPT_URL,$url);
  28. curl_setopt($ch, CURLOPT_POSTFIELDS,$postFields);
  29. curl_setopt($ch, CURLOPT_POST, 1);
  30. curl_setopt($ch, CURLOPT_HEADER, 0);
  31. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  32. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //to suppress the curl output
  33. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
  34. $result = curl_exec($ch);
  35. curl_close ($ch);
  36. }
  37. catch(Exception $ex) {
  38.  
  39. }
  40.