1: <?php
2: /**
3: * Error codes and descriptions for the Facebook API.
4: *
5: * Copyright 2009-2012 Horde LLC (http://www.horde.org/)
6: *
7: * @author Michael J. Rubinsky <mrubinsk@horde.org>
8: * @category Horde
9: * @package Service_Facebook
10: */
11: class Horde_Service_Facebook_ErrorCodes
12: {
13: const API_EC_SUCCESS = 0;
14:
15: /*
16: * GENERAL ERRORS
17: */
18: const API_EC_UNKNOWN = 1;
19: const API_EC_SERVICE = 2;
20: const API_EC_METHOD = 3;
21: const API_EC_TOO_MANY_CALLS = 4;
22: const API_EC_BAD_IP = 5;
23: const API_EC_HOST_API = 6;
24: const API_EC_HOST_UP = 7;
25: const API_EC_SECURE = 8;
26: const API_EC_RATE = 9;
27: const API_EC_PERMISSION_DENIED = 10;
28: const API_EC_DEPRECATED = 11;
29: const API_EC_VERSION = 12;
30:
31: /*
32: * PARAMETER ERRORS
33: */
34: const API_EC_PARAM = 100;
35: const API_EC_PARAM_API_KEY = 101;
36: const API_EC_PARAM_SESSION_KEY = 102;
37: const API_EC_PARAM_CALL_ID = 103;
38: const API_EC_PARAM_SIGNATURE = 104;
39: const API_EC_PARAM_TOO_MANY = 105;
40: const API_EC_PARAM_USER_ID = 110;
41: const API_EC_PARAM_USER_FIELD = 111;
42: const API_EC_PARAM_SOCIAL_FIELD = 112;
43: const API_EC_PARAM_EMAIL = 113;
44: const API_EC_PARAM_USER_ID_LIST = 114;
45: const API_EC_PARAM_ALBUM_ID = 120;
46: const API_EC_PARAM_PHOTO_ID = 121;
47: const API_EC_PARAM_FEED_PRIORITY = 130;
48: const API_EC_PARAM_CATEGORY = 140;
49: const API_EC_PARAM_SUBCATEGORY = 141;
50: const API_EC_PARAM_TITLE = 142;
51: const API_EC_PARAM_DESCRIPTION = 143;
52: const API_EC_PARAM_BAD_JSON = 144;
53: const API_EC_PARAM_BAD_EID = 150;
54: const API_EC_PARAM_UNKNOWN_CITY = 151;
55: const API_EC_PARAM_BAD_PAGE_TYPE = 152;
56:
57: /*
58: * USER PERMISSIONS ERRORS
59: */
60: const API_EC_PERMISSION = 200;
61: const API_EC_PERMISSION_USER = 210;
62: const API_EC_PERMISSION_ALBUM = 220;
63: const API_EC_PERMISSION_PHOTO = 221;
64: const API_EC_PERMISSION_MESSAGE = 230;
65: const API_EC_PERMISSION_OTHER_USER = 240;
66: const API_EC_PERMISSION_STATUS_UPDATE = 250;
67: const API_EC_PERMISSION_PHOTO_UPLOAD = 260;
68: const API_EC_PERMISSION_VIDEO_UPLOAD = 261;
69: const API_EC_PERMISSION_SMS = 270;
70: const API_EC_PERMISSION_CREATE_LISTING = 280;
71: const API_EC_PERMISSION_CREATE_NOTE = 281;
72: const API_EC_PERMISSION_SHARE_ITEM = 282;
73: const API_EC_PERMISSION_EVENT = 290;
74: const API_EC_PERMISSION_LARGE_FBML_TEMPLATE = 291;
75: const API_EC_PERMISSION_LIVEMESSAGE = 292;
76: const API_EC_PERMISSION_RSVP_EVENT = 299;
77:
78: /*
79: * DATA EDIT ERRORS
80: */
81: const API_EC_EDIT = 300;
82: const API_EC_EDIT_USER_DATA = 310;
83: const API_EC_EDIT_PHOTO = 320;
84: const API_EC_EDIT_ALBUM_SIZE = 321;
85: const API_EC_EDIT_PHOTO_TAG_SUBJECT = 322;
86: const API_EC_EDIT_PHOTO_TAG_PHOTO = 323;
87: const API_EC_EDIT_PHOTO_FILE = 324;
88: const API_EC_EDIT_PHOTO_PENDING_LIMIT = 325;
89: const API_EC_EDIT_PHOTO_TAG_LIMIT = 326;
90: const API_EC_EDIT_ALBUM_REORDER_PHOTO_NOT_IN_ALBUM = 327;
91: const API_EC_EDIT_ALBUM_REORDER_TOO_FEW_PHOTOS = 328;
92:
93: const API_EC_MALFORMED_MARKUP = 329;
94: const API_EC_EDIT_MARKUP = 330;
95:
96: const API_EC_EDIT_FEED_TOO_MANY_USER_CALLS = 340;
97: const API_EC_EDIT_FEED_TOO_MANY_USER_ACTION_CALLS = 341;
98: const API_EC_EDIT_FEED_TITLE_LINK = 342;
99: const API_EC_EDIT_FEED_TITLE_LENGTH = 343;
100: const API_EC_EDIT_FEED_TITLE_NAME = 344;
101: const API_EC_EDIT_FEED_TITLE_BLANK = 345;
102: const API_EC_EDIT_FEED_BODY_LENGTH = 346;
103: const API_EC_EDIT_FEED_PHOTO_SRC = 347;
104: const API_EC_EDIT_FEED_PHOTO_LINK = 348;
105:
106: const API_EC_EDIT_VIDEO_SIZE = 350;
107: const API_EC_EDIT_VIDEO_INVALID_FILE = 351;
108: const API_EC_EDIT_VIDEO_INVALID_TYPE = 352;
109: const API_EC_EDIT_VIDEO_FILE = 353;
110:
111: const API_EC_EDIT_FEED_TITLE_ARRAY = 360;
112: const API_EC_EDIT_FEED_TITLE_PARAMS = 361;
113: const API_EC_EDIT_FEED_BODY_ARRAY = 362;
114: const API_EC_EDIT_FEED_BODY_PARAMS = 363;
115: const API_EC_EDIT_FEED_PHOTO = 364;
116: const API_EC_EDIT_FEED_TEMPLATE = 365;
117: const API_EC_EDIT_FEED_TARGET = 366;
118: const API_EC_EDIT_FEED_MARKUP = 367;
119:
120: /**
121: * SESSION ERRORS
122: */
123: const API_EC_SESSION_TIMED_OUT = 450;
124: const API_EC_SESSION_METHOD = 451;
125: const API_EC_SESSION_INVALID = 452;
126: const API_EC_SESSION_REQUIRED = 453;
127: const API_EC_SESSION_REQUIRED_FOR_SECRET = 454;
128: const API_EC_SESSION_CANNOT_USE_SESSION_SECRET = 455;
129:
130:
131: /**
132: * FQL ERRORS
133: */
134: const FQL_EC_UNKNOWN_ERROR = 600;
135: const FQL_EC_PARSER = 601; // backwards compatibility
136: const FQL_EC_PARSER_ERROR = 601;
137: const FQL_EC_UNKNOWN_FIELD = 602;
138: const FQL_EC_UNKNOWN_TABLE = 603;
139: const FQL_EC_NOT_INDEXABLE = 604; // backwards compatibility
140: const FQL_EC_NO_INDEX = 604;
141: const FQL_EC_UNKNOWN_FUNCTION = 605;
142: const FQL_EC_INVALID_PARAM = 606;
143: const FQL_EC_INVALID_FIELD = 607;
144: const FQL_EC_INVALID_SESSION = 608;
145: const FQL_EC_UNSUPPORTED_APP_TYPE = 609;
146: const FQL_EC_SESSION_SECRET_NOT_ALLOWED = 610;
147:
148: const API_EC_REF_SET_FAILED = 700;
149:
150: /**
151: * DATA STORE API ERRORS
152: */
153: const API_EC_DATA_UNKNOWN_ERROR = 800;
154: const API_EC_DATA_INVALID_OPERATION = 801;
155: const API_EC_DATA_QUOTA_EXCEEDED = 802;
156: const API_EC_DATA_OBJECT_NOT_FOUND = 803;
157: const API_EC_DATA_OBJECT_ALREADY_EXISTS = 804;
158: const API_EC_DATA_DATABASE_ERROR = 805;
159: const API_EC_DATA_CREATE_TEMPLATE_ERROR = 806;
160: const API_EC_DATA_TEMPLATE_EXISTS_ERROR = 807;
161: const API_EC_DATA_TEMPLATE_HANDLE_TOO_LONG = 808;
162: const API_EC_DATA_TEMPLATE_HANDLE_ALREADY_IN_USE = 809;
163: const API_EC_DATA_TOO_MANY_TEMPLATE_BUNDLES = 810;
164: const API_EC_DATA_MALFORMED_ACTION_LINK = 811;
165: const API_EC_DATA_TEMPLATE_USES_RESERVED_TOKEN = 812;
166:
167: /*
168: * APPLICATION INFO ERRORS
169: */
170: const API_EC_NO_SUCH_APP = 900;
171:
172: /*
173: * BATCH ERRORS
174: */
175: const API_EC_BATCH_TOO_MANY_ITEMS = 950;
176: const API_EC_BATCH_ALREADY_STARTED = 951;
177: const API_EC_BATCH_NOT_STARTED = 952;
178: const API_EC_BATCH_METHOD_NOT_ALLOWED_IN_BATCH_MODE = 953;
179:
180: /*
181: * EVENT API ERRORS
182: */
183: const API_EC_EVENT_INVALID_TIME = 1000;
184:
185: /*
186: * INFO BOX ERRORS
187: */
188: const API_EC_INFO_NO_INFORMATION = 1050;
189: const API_EC_INFO_SET_FAILED = 1051;
190:
191: /*
192: * LIVEMESSAGE API ERRORS
193: */
194: const API_EC_LIVEMESSAGE_SEND_FAILED = 1100;
195: const API_EC_LIVEMESSAGE_EVENT_NAME_TOO_LONG = 1101;
196: const API_EC_LIVEMESSAGE_MESSAGE_TOO_LONG = 1102;
197:
198: /*
199: * CONNECT SESSION ERRORS
200: */
201: const API_EC_CONNECT_FEED_DISABLED = 1300;
202:
203: /*
204: * Platform tag bundles errors
205: */
206: const API_EC_TAG_BUNDLE_QUOTA = 1400;
207:
208: /*
209: * SHARE
210: */
211: const API_EC_SHARE_BAD_URL = 1500;
212:
213: /*
214: * NOTES
215: */
216: const API_EC_NOTE_CANNOT_MODIFY = 1600;
217:
218: /*
219: * COMMENTS
220: */
221: const API_EC_COMMENTS_UNKNOWN = 1700;
222: const API_EC_COMMENTS_POST_TOO_LONG = 1701;
223: const API_EC_COMMENTS_DB_DOWN = 1702;
224: const API_EC_COMMENTS_INVALID_XID = 1703;
225: const API_EC_COMMENTS_INVALID_UID = 1704;
226: const API_EC_COMMENTS_INVALID_POST = 1705;
227: }
228: