/**
  * Get html for creating of this component, depending on defined settings.
  * @return string html
  */
 public function GetOutputHtml()
 {
     // check consistency
     if ($this->actionText == null) {
         throw new Exception('Invite Friends Error:  Main Title is not set.');
     }
     if ($this->content == null) {
         throw new Exception('Invite Friends Error:  Content is not set.');
     }
     if ($this->confirmButtonText == null) {
         throw new Exception('Invite Friends Error:  Confirm Button Title is not set.');
     }
     // set defaults
     if ($this->actionUrl == null) {
         $this->actionUrl = AppConfig::GetAppCanvasUrl();
     }
     if ($this->acceptUrl == null) {
         $this->acceptUrl = $this->actionUrl;
     }
     if ($this->appName == null) {
         $this->appName = AppConfig::GetAppName();
     }
     $html = "<fb:serverfbml ";
     if ($this->width != null) {
         $html .= "width='" . $this->width . "' ";
     }
     $html .= ">\n";
     $html .= "<script type='text/fbml'>\n";
     $html .= "<div style='" . $this->cssStyle . "' class='" . $this->cssClass . "' >\n";
     $html .= "<fb:fbml>\n";
     $html .= "<fb:request-form  method=\"GET\" target=\"_top\" action=\"";
     $html .= $this->actionUrl;
     $html .= "\" content=\"";
     $html .= $this->content;
     $html .= "\n<fb:req-choice url='";
     $html .= $this->acceptUrl;
     $html .= "' label='";
     $html .= $this->confirmButtonText;
     $html .= "' />\"\n type=\"";
     $html .= $this->appName;
     $html .= "\" invite=\"true\">\n";
     $html .= "<fb:multi-friend-selector target=\"_top\" condensed=\"false\" exclude_ids=\"";
     $html .= $this->excludeFriends;
     $html .= "\"  actiontext=\"";
     $html .= $this->actionText;
     $html .= "\" showborder=\"";
     if ($this->showBorder == true) {
         $html .= "true";
     } else {
         $html .= "false";
     }
     $html .= "\" rows=\"";
     $html .= $this->rowsCount;
     if ($this->columnsCount < 5) {
         $html .= "\" cols=\"";
         $html .= $this->columnsCount;
     }
     $html .= "\" email_invite=\"";
     if ($this->emailInvite == true) {
         $html .= "true";
     } else {
         $html .= "false";
     }
     $html .= "\" import_external_friends=\"";
     if ($this->importExternalFriends == true) {
         $html .= "true";
     } else {
         $html .= "false";
     }
     $html .= "\" />\n";
     $html .= "</fb:request-form>\n";
     $html .= "</fb:fbml>\n";
     $html .= "</div>";
     $html .= "</script>\n";
     $html .= "</fb:serverfbml>\n";
     return $html;
 }
 /**
  * Get html for creating of this component, depending on defined settings.
  * @return string html
  */
 public function GetOutputHtml()
 {
     // check consistency
     if ($this->content == null) {
         throw new Exception('Invite Friends Error:  Content is not set.');
     }
     if ($this->confirmButtonText == null) {
         throw new Exception('Invite Friends Error:  Confirm Button Title is not set.');
     }
     // set defaults
     if ($this->actionUrl == null) {
         $this->actionUrl = AppConfig::GetAppCanvasUrl();
     }
     if ($this->acceptUrl == null) {
         $this->acceptUrl = $this->actionUrl;
     }
     if ($this->appName == null) {
         $this->appName = AppConfig::GetAppName();
     }
     $html = "<div style='" . $this->cssStyle . "' class='" . $this->cssClass . "' >\n";
     $html .= "<fb:serverfbml ";
     if ($this->width != null) {
         $html .= "width='" . $this->width . "' ";
     }
     $html .= ">\n";
     $html .= "<script type='text/fbml'>";
     $html .= "<div style='" . $this->cssStyle . "' class='" . $this->cssClass . "' >\n";
     $html .= "<fb:fbml>";
     $html .= "<fb:request-form  method=\"GET\" target=\"_top\" action=\"";
     $html .= $this->actionUrl;
     $html .= "\" content=\"";
     $html .= $this->content;
     $html .= "<fb:req-choice url='";
     $html .= $this->acceptUrl;
     $html .= "' label='";
     $html .= $this->confirmButtonText;
     $html .= "' />\" type=\"";
     $html .= $this->appName;
     $html .= "\" invite=\"true\">";
     $html .= "<fb:multi-friend-selector condensed=\"true\" exclude_ids=\"";
     $html .= $this->excludeFriends;
     $html .= "\" style=\"width:";
     $html .= $this->selectorWidth;
     $html .= "px\" unselected_rows=\"";
     $html .= $this->unselectedRows;
     $html .= "\" selected_rows=\"";
     $html .= $this->selectedRows;
     $html .= "\"  />";
     $html .= "<fb:request-form-submit />";
     $html .= "</fb:request-form> ";
     $html .= "</fb:fbml>";
     $html .= "</div>";
     $html .= "</script>";
     $html .= "</fb:serverfbml>";
     $html .= "</div>";
     return $html;
 }
if ($_SERVER["SERVER_NAME"] == "localhost") {
    Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYPEER] = false;
    Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYHOST] = 2;
}
require_once 'AppConfig.php';
if (AppConfig::GetAppId() == null) {
    throw new Exception("AppId key is not set. Please edit AppConfig.php file and set value from your application");
}
if (AppConfig::GetSecret() == null) {
    throw new Exception("App secret key is not set. Please edit AppConfig.php file and set value from your application");
}
if (AppConfig::GetAppName() == null) {
    throw new Exception("App name is not set. Please edit AppConfig.php file and set value from your application");
}
if (AppConfig::GetAppCanvasUrl() == null) {
    throw new Exception("App Canvas URL is not set. Please edit AppConfig.php file and set value from your application");
}
require_once 'GraphApi.php';
require_once 'LoginButton.php';
require_once 'RequestDialog.php';
require_once 'InviteFriends.php';
require_once 'InviteFriendsCondensed.php';
require_once 'StreamPublish.php';
require_once 'Permissions.php';
require_once 'LikeButton.php';
require_once 'SendButton.php';
require_once 'LikeBox.php';
require_once 'Comments.php';
require_once 'Bookmark.php';
require_once 'Recommendations.php';