summaryrefslogtreecommitdiff
path: root/actions/twitapifavorites.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/twitapifavorites.php')
-rw-r--r--actions/twitapifavorites.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/actions/twitapifavorites.php b/actions/twitapifavorites.php
index 932ee7933..d7d77907d 100644
--- a/actions/twitapifavorites.php
+++ b/actions/twitapifavorites.php
@@ -117,6 +117,11 @@ class TwitapifavoritesAction extends TwitterapiAction {
function create($args, $apidata) {
parent::handle($args);
+ if (!in_array($apidata['content-type'], array('xml', 'json'))) {
+ common_user_error(_('API method not found!'), $code = 404);
+ exit;
+ }
+
// Check for RESTfulness
if (!in_array($_SERVER['REQUEST_METHOD'], array('POST', 'DELETE'))) {
// XXX: Twitter just prints the err msg, no XML / JSON.