public function addMail($identifier, $email) { $info = $identifier; $info['email'] = $email; $url = self::BASE_URL . 'addmail.php'; return json_decode(Curl::do_post($url, $info)); }
function post_facepalm($time, $reason) { if (empty($reason)) { $str = 'Facepalm para ' . $this->user->nombre; } else { $str = 'Facepalm para ' . $this->user->nombre . ' ' . $reason; } if ($str > 140) { $str = substr($str, 0, 137) . '...'; } $response = Curl::do_post('https://' . (self::USERNAME . ':' . self::PASSWORD) . '@identi.ca/api/statuses/update.json', array('status' => $str)); }
function post_facepalm($time, $reason) { if (empty($reason)) { $str = 'Facepalm'; } else { $str = 'Facepalm ' . $reason; } $credentials = $this->user->getSocialNetworkCredentiales(SOCIAL_NETWORK_FACEBOOK); if (!$credentials) { return; } $base_url = $GLOBALS['config']['base_url']; $response = Curl::do_post('https://graph.facebook.com/me/feed', array('message' => $str, 'access_token' => $credentials->access_token, 'picture' => $base_url . 'facepalm1.jpg', 'link' => $base_url, 'name' => 'Facepalm!')); }