class TwitapiaccountAction extends TwitterapiAction {
+ function is_readonly() {
+
+ static $write_methods = array( 'update_location',
+ 'update_delivery_device');
+
+ $cmdtext = explode('.', $this->arg('method'));
+
+ if (in_array($cmdtext[0], $write_methods)) {
+ return false;
+ }
+
+ return true;
+ }
+
function verify_credentials($args, $apidata) {
if ($apidata['content-type'] == 'xml') {
if (!is_null($location) && strlen($location) > 255) {
- // XXX: Twitter just truncates and runs with it.
+ // XXX: But Twitter just truncates and runs with it. -- Zach
header('HTTP/1.1 406 Not Acceptable');
print "That's too long. Max notice size is 255 chars.\n";
exit();
}
common_broadcast_profile($profile);
+ $type = $apidata['content-type'];
- $apidata['api_arg'] = $user->id;
- $this->show($args, $apidata);
+ $this->init_document($type);
+ $this->show_profile($profile, $type);
+ $this->end_document($type);
exit();
}