fbdefines.java

来自「Sony Ericsson手机上的Facebook客户端全套代码」· Java 代码 · 共 342 行

JAVA
342
字号
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   FbDefines.java

package com.sonyericsson.fb.api;


public class FbDefines
{

    public FbDefines()
    {
    }

    public static boolean isAPISuccessful(int status)
    {
        return status == 0;
    }

    public static boolean isAPIFailed(int status)
    {
        return status >= 1;
    }

    public static String getStatusMessage(int status)
    {
        String message = "";
        switch(status)
        {
        case 0: // '\0'
            message = "Operation succeeded";
            break;

        case 1: // '\001'
            message = "Unknown error";
            break;

        case 2: // '\002'
            message = "Service temporarily unavailable  (all)";
            break;

        case 3: // '\003'
            message = "Unknown method";
            break;

        case 4: // '\004'
            message = "Application request limit reached  (all)";
            break;

        case 5: // '\005'
            message = "Unauthorized source IP address  (all)";
            break;

        case 6: // '\006'
            message = "This method must run on api.facebook.com  (all)";
            break;

        case 100: // 'd'
            message = "Invalid parameter  (all)";
            break;

        case 101: // 'e'
            message = "Invalid API key  (all)";
            break;

        case 102: // 'f'
            message = "Session key invalid or no longer valid  (all)";
            break;

        case 103: // 'g'
            message = "The submitted call_id was not greater than the previous call_id for this session.";
            break;

        case 104: // 'h'
            message = "Incorrect signature  (all)";
            break;

        case 110: // 'n'
            message = "Invalid user id  photos.addTag";
            break;

        case 120: // 'x'
            message = "Invalid album id";
            break;

        case 121: // 'y'
            message = "Invalid photo id";
            break;

        case 130: 
            message = "Invalid feed publication priority";
            break;

        case 200: 
            message = "Permissions error";
            break;

        case 221: 
            message = "Photo not visible.";
            break;

        case 240: 
            message = "Desktop applications cannot set FBML for other users";
            break;

        case 250: 
            message = "Updating status requires the extended permission status_update.  users.setStatus";
            break;

        case 260: 
            message = "Modifying existing photos requires the extended permission photo_upload  photos.upload, photos.addTag";
            break;

        case 321: 
            message = "Album is full";
            break;

        case 322: 
            message = "Invalid photo tag subject";
            break;

        case 323: 
            message = "Cannot tag photo already visible on facebook";
            break;

        case 324: 
            message = "Missing or invalid image file";
            break;

        case 325: 
            message = "Too many unapproved photos pending";
            break;

        case 326: 
            message = "Too many unapproved photos pending";
            break;

        case 330: 
            message = "Failed to set markup";
            break;

        case 340: 
            message = "Feed publication request limit reached";
            break;

        case 341: 
            message = "Feed action request limit reached";
            break;

        case 342: 
            message = "Feed story title can have at most one href anchor";
            break;

        case 343: 
            message = "Feed story title is too long";
            break;

        case 344: 
            message = "Feed story title can have at most one fb:userlink and must be of the user whose action is being reported";
            break;

        case 345: 
            message = "Feed story title rendered as blank";
            break;

        case 346: 
            message = "Feed story body is too long";
            break;

        case 347: 
            message = "Feed story photo could not be accessed or proxied";
            break;

        case 348: 
            message = "Feed story photo link invalid";
            break;

        case 500: 
            message = "Message contains banned content.";
            break;

        case 501: 
            message = "Missing message body.";
            break;

        case 502: 
            message = "Message is too long.";
            break;

        case 503: 
            message = "User has sent too many messages.";
            break;

        case 504: 
            message = "Invalid reply thread id.";
            break;

        case 505: 
            message = "Invalid message recipient.";
            break;

        case 510: 
            message = "Invalid poke recipient.";
            break;

        case 511: 
            message = "There is a poke already outstanding.";
            break;

        case 512: 
            message = "User is poking too fast.";
            break;

        case 600: 
            message = "An unknown error occurred in FQL";
            break;

        case 601: 
            message = "Error while parsing FQL statement";
            break;

        case 602: 
            message = "The field you requested does not exist";
            break;

        case 603: 
            message = "The table you requested does not exist";
            break;

        case 604: 
            message = "Your statement is not indexable";
            break;

        case 605: 
            message = "The function you called does not exist";
            break;

        case 606: 
            message = "Wrong number of arguments passed into the function";
            break;

        case 700: 
            message = "Unknown failure in storing ref data. Please try again.";
            break;

        case 950: 
            message = "Each batch API can not contain more than 20 items";
            break;

        case 2000: 
            message = "FbAPI internal argument error";
            break;

        case 2001: 
            message = "The XML parser could not parse the data";
            break;

        case 2002: 
            message = "Error in HTTP connection class";
            break;

        case 2003: 
            message = "Facebook session is not connected";
            break;

        case 2004: 
            message = "Operation was cancelled";
            break;
        }
        return message;
    }

    public static final int FB_API_SUCCESS = 0;
    public static final int FB_API_ERROR_UNKNOWN = 1;
    public static final int FB_API_ERROR_SERVICE = 2;
    public static final int FB_API_ERROR_METHOD = 3;
    public static final int FB_API_ERROR_TOO_MANY_CALLS = 4;
    public static final int FB_API_ERROR_BAD_IP = 5;
    public static final int FB_API_ERROR_HOST_API = 6;
    public static final int FB_API_ERROR_PARAM = 100;
    public static final int FB_API_ERROR_KEY = 101;
    public static final int FB_API_ERROR_SESSION_KEY = 102;
    public static final int FB_API_ERROR_CALL_ID = 103;
    public static final int FB_API_ERROR_SIGNATURE = 104;
    public static final int FB_API_ERROR_PARAM_USER_ID = 110;
    public static final int FB_API_ERROR_ALBUM_ID = 120;
    public static final int FB_API_ERROR_PHOTO_ID = 121;
    public static final int FB_API_ERROR_FEED_PRIORITY = 130;
    public static final int FB_API_ERROR_PERMISSION = 200;
    public static final int FB_API_ERROR_PHOTO_NO_VISIBLE = 221;
    public static final int FB_API_ERROR_PERMISSION_MARKUP_OTHER_USER = 240;
    public static final int FB_API_ERROR_PERMISSION_STATUS_UPDATE = 250;
    public static final int FB_API_ERROR_PERMISSION_PHOTO_UPLOAD = 260;
    public static final int FB_API_ERROR_EDIT_ALBUM_SIZE = 321;
    public static final int FB_API_ERROR_EDIT_PHOTO_TAG_SUBJECT = 322;
    public static final int FB_API_ERROR_EDIT_PHOTO_TAG_PHOTO = 323;
    public static final int FB_API_ERROR_EDIT_PHOTO_FILE = 324;
    public static final int FB_API_ERROR_EDIT_PHOTO_PENDING_LIMIT = 325;
    public static final int FB_API_ERROR_EDIT_PHOTO_TAG_LIMIT = 326;
    public static final int FB_API_ERROR_EDIT_MARKUP = 330;
    public static final int FB_API_ERROR_EDIT_FEED_TOO_MANY_USER_CALLS = 340;
    public static final int FB_API_ERROR_EDIT_FEED_TOO_MANY_USER_ACTION_CALLS = 341;
    public static final int FB_API_ERROR_EDIT_FEED_TITLE_LINK = 342;
    public static final int FB_API_ERROR_EDIT_FEED_TITLE_LENGTH = 343;
    public static final int FB_API_ERROR_EDIT_FEED_TITLE_NAME = 344;
    public static final int FB_API_ERROR_EDIT_FEED_TITLE_BLANK = 345;
    public static final int FB_API_ERROR_EDIT_FEED_BODY_LENGTH = 346;
    public static final int FB_API_ERROR_EDIT_FEED_PHOTO_SRC = 347;
    public static final int FB_API_ERROR_EDIT_FEED_PHOTO_LINK = 348;
    public static final int FB_API_ERROR_MESSAGE_BANNED_CONTENT = 500;
    public static final int FB_API_ERROR_MESSAGE_MISSING_BODY = 501;
    public static final int FB_API_ERROR_MESSAGE_TOO_LONG = 502;
    public static final int FB_API_ERROR_MESSAGE_TOO_MANY_MESSAGES = 503;
    public static final int FB_API_ERROR_MESSAGE_INVALID_REPLY_THREAD_ID = 504;
    public static final int FB_API_ERROR_MESSAGE_INVALID_RECIPIENT = 505;
    public static final int FB_API_ERROR_POKE_INVALID_RECIPIENT = 510;
    public static final int FB_API_ERROR_POKE_ALREADY_OUTSTANDING = 511;
    public static final int FB_API_ERROR_POKE_TOO_FAST = 512;
    public static final int FB_API_ERROR_FQL_UNKNOWN__ERROR = 600;
    public static final int FB_API_ERROR_FQL_PARSER_ERROR = 601;
    public static final int FB_API_ERROR_FQL_UNKNOWN_FIELD = 602;
    public static final int FB_API_ERROR_FQL_UNKNOWN_TABLE = 603;
    public static final int FB_API_ERROR_FQL_NO_INDEX = 604;
    public static final int FB_API_ERROR_FQL_UNKNOWN_FUNCTION = 605;
    public static final int FB_API_ERROR_FQL_INVALID_PARAM = 606;
    public static final int FB_API_ERROR_REF_SET_FAILED = 700;
    public static final int FB_API_ERROR_BATCH_TOO_MANY_CALLS = 950;
    public static final int FB_API_ERROR_ARGUMENT = 2000;
    public static final int FB_API_ERROR_XML_PARSER = 2001;
    public static final int FB_API_ERROR_HTTP = 2002;
    public static final int FB_API_ERROR_SESSION = 2003;
    public static final int FB_API_ERROR_CANCELLED = 2004;
    public static final String APPLICATION_API_KEY = "cab9b0c2b22b9628e5d4966412f1c1a1";
    public static final String APPLICATION_SECRET_KEY = "4c2ba82712e7fc831c0ad4f9865922ae";
    public static final String APPLICATION_ID = "30946156915";
    public static final String FACEBOOK_RESTSERVER_SECURE_URL = "https://api.facebook.com/restserver.php";
    public static final String FACEBOOK_RESTSERVER_URL = "http://api.facebook.com/restserver.php";
    public static final String FACEBOOK_NEWS_FEED_URL = "http://iphone.facebook.com/touch/feed.php";
    public static final String FACEBOOK_LOGIN_URL = "";
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?