com.facebook.model.GraphObject Java Examples

The following examples show how to use com.facebook.model.GraphObject. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GraphObjectAdapter.java    From Klyph with MIT License 6 votes vote down vote up
protected URI getPictureUriOfGraphObject(T graphObject) {
    String uri = null;
    Object o = graphObject.getProperty(PICTURE);
    if (o instanceof String) {
        uri = (String) o;
    } else if (o instanceof JSONObject) {
        ItemPicture itemPicture = GraphObject.Factory.create((JSONObject) o).cast(ItemPicture.class);
        ItemPictureData data = itemPicture.getData();
        if (data != null) {
            uri = data.getUrl();
        }
    }

    if (uri != null) {
        try {
            return new URI(uri);
        } catch (URISyntaxException e) {
        }
    }
    return null;
}
 
Example #2
Source File: Utility.java    From facebook-api-android-maven with Apache License 2.0 6 votes vote down vote up
public static void setAppEventExtendedDeviceInfoParameters(GraphObject params, Context appContext) {
  JSONArray extraInfoArray = new JSONArray();
  extraInfoArray.put(EXTRA_APP_EVENTS_INFO_FORMAT_VERSION);

  // Application Manifest info:
  String pkgName = appContext.getPackageName();
  int versionCode = -1;
  String versionName = "";

  try {
    PackageInfo pi = appContext.getPackageManager().getPackageInfo(pkgName, 0);
    versionCode = pi.versionCode;
    versionName = pi.versionName;
  } catch (PackageManager.NameNotFoundException e) {
    // Swallow
  }

  // Application Manifest info:
  extraInfoArray.put(pkgName);
  extraInfoArray.put(versionCode);
  extraInfoArray.put(versionName);

  params.setProperty("extinfo", extraInfoArray.toString());
}
 
Example #3
Source File: GraphObjectAdapter.java    From HypFacebook with BSD 2-Clause "Simplified" License 6 votes vote down vote up
protected URL getPictureUrlOfGraphObject(T graphObject) {
    String url = null;
    Object o = graphObject.getProperty(PICTURE);
    if (o instanceof String) {
        url = (String) o;
    } else if (o instanceof JSONObject) {
        ItemPicture itemPicture = GraphObject.Factory.create((JSONObject) o).cast(ItemPicture.class);
        ItemPictureData data = itemPicture.getData();
        if (data != null) {
            url = data.getUrl();
        }
    }

    if (url != null) {
        try {
            return new URL(url);
        } catch (MalformedURLException e) {
        }
    }
    return null;
}
 
Example #4
Source File: Utility.java    From barterli_android with Apache License 2.0 6 votes vote down vote up
public static FetchedAppSettings queryAppSettings(final String applicationId, final boolean forceRequery) {

        // Cache the last app checked results.
        if (!forceRequery && fetchedAppSettings.containsKey(applicationId)) {
            return fetchedAppSettings.get(applicationId);
        }

        Bundle appSettingsParams = new Bundle();
        appSettingsParams.putString(APPLICATION_FIELDS, TextUtils.join(",", APP_SETTING_FIELDS));

        Request request = Request.newGraphPathRequest(null, applicationId, null);
        request.setParameters(appSettingsParams);

        GraphObject supportResponse = request.executeAndWait().getGraphObject();
        FetchedAppSettings result = new FetchedAppSettings(
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_ATTRIBUTION),
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_IMPLICIT_SDK_LOGGING));

        fetchedAppSettings.put(applicationId, result);

        return result;
    }
 
Example #5
Source File: GraphObjectAdapter.java    From aws-mobile-self-paced-labs-samples with Apache License 2.0 6 votes vote down vote up
protected URL getPictureUrlOfGraphObject(T graphObject) {
    String url = null;
    Object o = graphObject.getProperty(PICTURE);
    if (o instanceof String) {
        url = (String) o;
    } else if (o instanceof JSONObject) {
        ItemPicture itemPicture = GraphObject.Factory.create((JSONObject) o).cast(ItemPicture.class);
        ItemPictureData data = itemPicture.getData();
        if (data != null) {
            url = data.getUrl();
        }
    }

    if (url != null) {
        try {
            return new URL(url);
        } catch (MalformedURLException e) {
        }
    }
    return null;
}
 
Example #6
Source File: Utility.java    From Abelana-Android with Apache License 2.0 6 votes vote down vote up
public static FetchedAppSettings queryAppSettings(final String applicationId, final boolean forceRequery) {

        // Cache the last app checked results.
        if (!forceRequery && fetchedAppSettings.containsKey(applicationId)) {
            return fetchedAppSettings.get(applicationId);
        }

        Bundle appSettingsParams = new Bundle();
        appSettingsParams.putString(APPLICATION_FIELDS, TextUtils.join(",", APP_SETTING_FIELDS));

        Request request = Request.newGraphPathRequest(null, applicationId, null);
        request.setParameters(appSettingsParams);

        GraphObject supportResponse = request.executeAndWait().getGraphObject();
        FetchedAppSettings result = new FetchedAppSettings(
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_ATTRIBUTION),
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_IMPLICIT_SDK_LOGGING),
                safeGetStringFromResponse(supportResponse, NUX_CONTENT),
                safeGetBooleanFromResponse(supportResponse, NUX_ENABLED)
                );

        fetchedAppSettings.put(applicationId, result);

        return result;
    }
 
Example #7
Source File: GraphObjectAdapter.java    From Klyph with MIT License 6 votes vote down vote up
private static int compareGraphObjects(GraphObject a, GraphObject b, Collection<String> sortFields,
        Collator collator) {
    for (String sortField : sortFields) {
        String sa = (String) a.getProperty(sortField);
        String sb = (String) b.getProperty(sortField);

        if (sa != null && sb != null) {
            int result = collator.compare(sa, sb);
            if (result != 0) {
                return result;
            }
        } else if (!(sa == null && sb == null)) {
            return (sa == null) ? -1 : 1;
        }
    }
    return 0;
}
 
Example #8
Source File: Utility.java    From platform-friends-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public static FetchedAppSettings queryAppSettings(final String applicationId, final boolean forceRequery) {

        // Cache the last app checked results.
        if (!forceRequery && fetchedAppSettings.containsKey(applicationId)) {
            return fetchedAppSettings.get(applicationId);
        }

        Bundle appSettingsParams = new Bundle();
        appSettingsParams.putString(APPLICATION_FIELDS, TextUtils.join(",", APP_SETTING_FIELDS));

        Request request = Request.newGraphPathRequest(null, applicationId, null);
        request.setParameters(appSettingsParams);

        GraphObject supportResponse = request.executeAndWait().getGraphObject();
        FetchedAppSettings result = new FetchedAppSettings(
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_ATTRIBUTION),
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_IMPLICIT_SDK_LOGGING));

        fetchedAppSettings.put(applicationId, result);

        return result;
    }
 
Example #9
Source File: GraphObjectAdapter.java    From facebook-api-android-maven with Apache License 2.0 6 votes vote down vote up
private static int compareGraphObjects(GraphObject a, GraphObject b, Collection<String> sortFields,
        Collator collator) {
    for (String sortField : sortFields) {
        String sa = (String) a.getProperty(sortField);
        String sb = (String) b.getProperty(sortField);

        if (sa != null && sb != null) {
            int result = collator.compare(sa, sb);
            if (result != 0) {
                return result;
            }
        } else if (!(sa == null && sb == null)) {
            return (sa == null) ? -1 : 1;
        }
    }
    return 0;
}
 
Example #10
Source File: Utility.java    From KlyphMessenger with MIT License 6 votes vote down vote up
public static FetchedAppSettings queryAppSettings(final String applicationId, final boolean forceRequery) {

        // Cache the last app checked results.
        if (!forceRequery && fetchedAppSettings.containsKey(applicationId)) {
            return fetchedAppSettings.get(applicationId);
        }

        Bundle appSettingsParams = new Bundle();
        appSettingsParams.putString(APPLICATION_FIELDS, TextUtils.join(",", APP_SETTING_FIELDS));

        Request request = Request.newGraphPathRequest(null, applicationId, null);
        request.setParameters(appSettingsParams);

        GraphObject supportResponse = request.executeAndWait().getGraphObject();
        FetchedAppSettings result = new FetchedAppSettings(
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_ATTRIBUTION),
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_IMPLICIT_SDK_LOGGING));

        fetchedAppSettings.put(applicationId, result);

        return result;
    }
 
Example #11
Source File: Utility.java    From facebook-api-android-maven with Apache License 2.0 6 votes vote down vote up
public static void setAppEventAttributionParameters(GraphObject params,
        AttributionIdentifiers attributionIdentifiers, String hashedDeviceAndAppId, boolean limitEventUsage) {
    // Send attributionID if it exists, otherwise send a hashed device+appid specific value as the advertiser_id.
    if (attributionIdentifiers != null && attributionIdentifiers.getAttributionId() != null) {
        params.setProperty("attribution", attributionIdentifiers.getAttributionId());
    }

    if (attributionIdentifiers != null && attributionIdentifiers.getAndroidAdvertiserId() != null) {
        params.setProperty("advertiser_id", attributionIdentifiers.getAndroidAdvertiserId());
        params.setProperty("advertiser_tracking_enabled", !attributionIdentifiers.isTrackingLimited());
    } else if (hashedDeviceAndAppId != null) {
        params.setProperty("advertiser_id", hashedDeviceAndAppId);
    }

    params.setProperty("application_tracking_enabled", !limitEventUsage);
}
 
Example #12
Source File: Utility.java    From Klyph with MIT License 6 votes vote down vote up
public static FetchedAppSettings queryAppSettings(final String applicationId, final boolean forceRequery) {

        // Cache the last app checked results.
        if (!forceRequery && fetchedAppSettings.containsKey(applicationId)) {
            return fetchedAppSettings.get(applicationId);
        }

        Bundle appSettingsParams = new Bundle();
        appSettingsParams.putString(APPLICATION_FIELDS, TextUtils.join(",", APP_SETTING_FIELDS));

        Request request = Request.newGraphPathRequest(null, applicationId, null);
        request.setParameters(appSettingsParams);

        GraphObject supportResponse = request.executeAndWait().getGraphObject();
        FetchedAppSettings result = new FetchedAppSettings(
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_ATTRIBUTION),
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_IMPLICIT_SDK_LOGGING));

        fetchedAppSettings.put(applicationId, result);

        return result;
    }
 
Example #13
Source File: GraphObjectAdapter.java    From aws-mobile-self-paced-labs-samples with Apache License 2.0 6 votes vote down vote up
private static int compareGraphObjects(GraphObject a, GraphObject b, Collection<String> sortFields,
        Collator collator) {
    for (String sortField : sortFields) {
        String sa = (String) a.getProperty(sortField);
        String sb = (String) b.getProperty(sortField);

        if (sa != null && sb != null) {
            int result = collator.compare(sa, sb);
            if (result != 0) {
                return result;
            }
        } else if (!(sa == null && sb == null)) {
            return (sa == null) ? -1 : 1;
        }
    }
    return 0;
}
 
Example #14
Source File: Utility.java    From facebook-api-android-maven with Apache License 2.0 6 votes vote down vote up
public static FetchedAppSettings queryAppSettings(final String applicationId, final boolean forceRequery) {

        // Cache the last app checked results.
        if (!forceRequery && fetchedAppSettings.containsKey(applicationId)) {
            return fetchedAppSettings.get(applicationId);
        }

        Bundle appSettingsParams = new Bundle();
        appSettingsParams.putString(APPLICATION_FIELDS, TextUtils.join(",", APP_SETTING_FIELDS));

        Request request = Request.newGraphPathRequest(null, applicationId, null);
        request.setParameters(appSettingsParams);

        GraphObject supportResponse = request.executeAndWait().getGraphObject();
        FetchedAppSettings result = new FetchedAppSettings(
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_ATTRIBUTION),
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_IMPLICIT_SDK_LOGGING),
                safeGetStringFromResponse(supportResponse, NUX_CONTENT),
                safeGetBooleanFromResponse(supportResponse, NUX_ENABLED)
                );

        fetchedAppSettings.put(applicationId, result);

        return result;
    }
 
Example #15
Source File: Utility.java    From android-skeleton-project with MIT License 6 votes vote down vote up
public static FetchedAppSettings queryAppSettings(final String applicationId, final boolean forceRequery) {

        // Cache the last app checked results.
        if (!forceRequery && fetchedAppSettings.containsKey(applicationId)) {
            return fetchedAppSettings.get(applicationId);
        }

        Bundle appSettingsParams = new Bundle();
        appSettingsParams.putString(APPLICATION_FIELDS, TextUtils.join(",", APP_SETTING_FIELDS));

        Request request = Request.newGraphPathRequest(null, applicationId, null);
        request.setParameters(appSettingsParams);

        GraphObject supportResponse = request.executeAndWait().getGraphObject();
        FetchedAppSettings result = new FetchedAppSettings(
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_ATTRIBUTION),
                safeGetBooleanFromResponse(supportResponse, SUPPORTS_IMPLICIT_SDK_LOGGING),
                safeGetStringFromResponse(supportResponse, NUX_CONTENT),
                safeGetBooleanFromResponse(supportResponse, NUX_ENABLED)
                );

        fetchedAppSettings.put(applicationId, result);

        return result;
    }
 
Example #16
Source File: FacebookActivityTestCase.java    From FacebookImageShareIntent with MIT License 5 votes vote down vote up
protected GraphObject getAndAssert(Session session, String id) {
    Request request = new Request(session, id);
    Response response = request.executeAndWait();
    assertNotNull(response);

    assertNull(response.getError());

    GraphObject result = response.getGraphObject();
    assertNotNull(result);

    return result;
}
 
Example #17
Source File: BatchRequestTests.java    From FacebookImageShareIntent with MIT License 5 votes vote down vote up
@LargeTest
public void testBatchPostStatusUpdate() {
    TestSession session = openTestSessionWithSharedUser();

    GraphObject statusUpdate1 = createStatusUpdate("1");
    GraphObject statusUpdate2 = createStatusUpdate("2");

    Request postRequest1 = Request.newPostRequest(session, "me/feed", statusUpdate1, null);
    postRequest1.setBatchEntryName("postRequest1");
    postRequest1.setBatchEntryOmitResultOnSuccess(false);
    Request postRequest2 = Request.newPostRequest(session, "me/feed", statusUpdate2, null);
    postRequest2.setBatchEntryName("postRequest2");
    postRequest2.setBatchEntryOmitResultOnSuccess(false);
    Request getRequest1 = new Request(session, "{result=postRequest1:$.id}");
    Request getRequest2 = new Request(session, "{result=postRequest2:$.id}");

    List<Response> responses = Request.executeBatchAndWait(postRequest1, postRequest2, getRequest1, getRequest2);
    assertNotNull(responses);
    assertEquals(4, responses.size());
    assertNoErrors(responses);

    GraphObject retrievedStatusUpdate1 = responses.get(2).getGraphObject();
    GraphObject retrievedStatusUpdate2 = responses.get(3).getGraphObject();
    assertNotNull(retrievedStatusUpdate1);
    assertNotNull(retrievedStatusUpdate2);

    assertEquals(statusUpdate1.getProperty("message"), retrievedStatusUpdate1.getProperty("message"));
    assertEquals(statusUpdate2.getProperty("message"), retrievedStatusUpdate2.getProperty("message"));
}
 
Example #18
Source File: Response.java    From KlyphMessenger with MIT License 5 votes vote down vote up
Response(Request request, HttpURLConnection connection, GraphObjectList<GraphObject> graphObjects,
        boolean isFromCache) {
    this.request = request;
    this.connection = connection;
    this.graphObject = null;
    this.graphObjectList = graphObjects;
    this.isFromCache = isFromCache;
    this.error = null;
}
 
Example #19
Source File: FacebookActivityTestCase.java    From FacebookImageShareIntent with MIT License 5 votes vote down vote up
protected GraphObject postGetAndAssert(Session session, String path, GraphObject graphObject) {
    Request request = Request.newPostRequest(session, path, graphObject, null);
    Response response = request.executeAndWait();
    assertNotNull(response);

    assertNull(response.getError());

    GraphObjectPostResult result = response.getGraphObjectAs(GraphObjectPostResult.class);
    assertNotNull(result);
    assertNotNull(result.getId());

    return getAndAssert(session, result.getId());
}
 
Example #20
Source File: Response.java    From KlyphMessenger with MIT License 5 votes vote down vote up
Response(Request request, HttpURLConnection connection, GraphObject graphObject, boolean isFromCache) {
    this.request = request;
    this.connection = connection;
    this.graphObject = graphObject;
    this.graphObjectList = null;
    this.isFromCache = isFromCache;
    this.error = null;
}
 
Example #21
Source File: GraphObjectAdapter.java    From FacebookNewsfeedSample-Android with Apache License 2.0 5 votes vote down vote up
int getPosition(String sectionKey, T graphObject) {
    int position = 0;
    boolean found = false;

    // First find the section key and increment position one for each header we will render;
    // increment by the size of each section prior to the one we want.
    for (String key : sectionKeys) {
        if (displaySections) {
            position++;
        }
        if (key.equals(sectionKey)) {
            found = true;
            break;
        } else {
            position += graphObjectsBySection.get(key).size();
        }
    }

    if (!found) {
        return -1;
    } else if (graphObject == null) {
        // null represents the header for a section; we counted this header in position earlier,
        // so subtract it back out.
        return position - (displaySections ? 1 : 0);
    }

    // Now find index of this item within that section.
    for (T t : graphObjectsBySection.get(sectionKey)) {
        if (GraphObject.Factory.hasSameId(t, graphObject)) {
            return position;
        }
        position++;
    }
    return -1;
}
 
Example #22
Source File: Response.java    From android-skeleton-project with MIT License 5 votes vote down vote up
/**
 * The single graph object returned for this request, if any, cast into a particular type of GraphObject.
 *
 * @param graphObjectClass the GraphObject-derived interface to cast the graph object into
 * @return the graph object returned, or null if none was returned (or if the result was a list)
 * @throws FacebookException If the passed in Class is not a valid GraphObject interface
 */
public final <T extends GraphObject> T getGraphObjectAs(Class<T> graphObjectClass) {
    if (graphObject == null) {
        return null;
    }
    if (graphObjectClass == null) {
        throw new NullPointerException("Must pass in a valid interface that extends GraphObject");
    }
    return graphObject.cast(graphObjectClass);
}
 
Example #23
Source File: Utility.java    From android-skeleton-project with MIT License 5 votes vote down vote up
private static String safeGetStringFromResponse(GraphObject response, String propertyName) {
    Object result = "";
    if (response != null) {
        result = response.getProperty(propertyName);
    }
    if (!(result instanceof String)) {
        result = "";
    }
    return (String) result;
}
 
Example #24
Source File: Utility.java    From android-skeleton-project with MIT License 5 votes vote down vote up
private static boolean safeGetBooleanFromResponse(GraphObject response, String propertyName) {
    Object result = false;
    if (response != null) {
        result = response.getProperty(propertyName);
    }
    if (!(result instanceof Boolean)) {
        result = false;
    }
    return (Boolean) result;
}
 
Example #25
Source File: Utility.java    From FacebookImageShareIntent with MIT License 5 votes vote down vote up
private static boolean safeGetBooleanFromResponse(GraphObject response, String propertyName) {
    Object result = false;
    if (response != null) {
        result = response.getProperty(propertyName);
    }
    if (!(result instanceof Boolean)) {
        result = false;
    }
    return (Boolean) result;
}
 
Example #26
Source File: Response.java    From barterli_android with Apache License 2.0 5 votes vote down vote up
private static Response createResponseFromObject(Request request, HttpURLConnection connection, Object object,
        boolean isFromCache, Object originalResult) throws JSONException {
    if (object instanceof JSONObject) {
        JSONObject jsonObject = (JSONObject) object;

        FacebookRequestError error =
                FacebookRequestError.checkResponseAndCreateError(jsonObject, originalResult, connection);
        if (error != null) {
            if (error.getErrorCode() == INVALID_SESSION_FACEBOOK_ERROR_CODE) {
                Session session = request.getSession();
                if (session != null) {
                    session.closeAndClearTokenInformation();
                }
            }
            return new Response(request, connection, error);
        }

        Object body = Utility.getStringPropertyAsJSON(jsonObject, BODY_KEY, NON_JSON_RESPONSE_PROPERTY);

        if (body instanceof JSONObject) {
            GraphObject graphObject = GraphObject.Factory.create((JSONObject) body);
            return new Response(request, connection, graphObject, isFromCache);
        } else if (body instanceof JSONArray) {
            GraphObjectList<GraphObject> graphObjectList = GraphObject.Factory.createList(
                    (JSONArray) body, GraphObject.class);
            return new Response(request, connection, graphObjectList, isFromCache);
        }
        // We didn't get a body we understand how to handle, so pretend we got nothing.
        object = JSONObject.NULL;
    }

    if (object == JSONObject.NULL) {
        return new Response(request, connection, (GraphObject)null, isFromCache);
    } else {
        throw new FacebookException("Got unexpected object type in response, class: "
                + object.getClass().getSimpleName());
    }
}
 
Example #27
Source File: Response.java    From barterli_android with Apache License 2.0 5 votes vote down vote up
Response(Request request, HttpURLConnection connection, GraphObjectList<GraphObject> graphObjects,
        boolean isFromCache) {
    this.request = request;
    this.connection = connection;
    this.graphObject = null;
    this.graphObjectList = graphObjects;
    this.isFromCache = isFromCache;
    this.error = null;
}
 
Example #28
Source File: GraphObjectAdapter.java    From android-skeleton-project with MIT License 5 votes vote down vote up
int getPosition(String sectionKey, T graphObject) {
    int position = 0;
    boolean found = false;

    // First find the section key and increment position one for each header we will render;
    // increment by the size of each section prior to the one we want.
    for (String key : sectionKeys) {
        if (displaySections) {
            position++;
        }
        if (key.equals(sectionKey)) {
            found = true;
            break;
        } else {
            position += graphObjectsBySection.get(key).size();
        }
    }

    if (!found) {
        return -1;
    } else if (graphObject == null) {
        // null represents the header for a section; we counted this header in position earlier,
        // so subtract it back out.
        return position - (displaySections ? 1 : 0);
    }

    // Now find index of this item within that section.
    for (T t : graphObjectsBySection.get(sectionKey)) {
        if (GraphObject.Factory.hasSameId(t, graphObject)) {
            return position;
        }
        position++;
    }
    return -1;
}
 
Example #29
Source File: GraphObjectAdapter.java    From Klyph with MIT License 5 votes vote down vote up
int getPosition(String sectionKey, T graphObject) {
    int position = 0;
    boolean found = false;

    // First find the section key and increment position one for each header we will render;
    // increment by the size of each section prior to the one we want.
    for (String key : sectionKeys) {
        if (displaySections) {
            position++;
        }
        if (key.equals(sectionKey)) {
            found = true;
            break;
        } else {
            position += graphObjectsBySection.get(key).size();
        }
    }

    if (!found) {
        return -1;
    } else if (graphObject == null) {
        // null represents the header for a section; we counted this header in position earlier,
        // so subtract it back out.
        return position - (displaySections ? 1 : 0);
    }

    // Now find index of this item within that section.
    for (T t : graphObjectsBySection.get(sectionKey)) {
        if (GraphObject.Factory.hasSameId(t, graphObject)) {
            return position;
        }
        position++;
    }
    return -1;
}
 
Example #30
Source File: TestSession.java    From KlyphMessenger with MIT License 5 votes vote down vote up
private void deleteTestAccount(String testAccountId, String appAccessToken) {
    Bundle parameters = new Bundle();
    parameters.putString("access_token", appAccessToken);

    Request request = new Request(null, testAccountId, parameters, HttpMethod.DELETE);
    Response response = request.executeAndWait();

    FacebookRequestError error = response.getError();
    GraphObject graphObject = response.getGraphObject();
    if (error != null) {
        Log.w(LOG_TAG, String.format("Could not delete test account %s: %s", testAccountId, error.getException().toString()));
    } else if (graphObject.getProperty(Response.NON_JSON_RESPONSE_PROPERTY) == (Boolean) false) {
        Log.w(LOG_TAG, String.format("Could not delete test account %s: unknown reason", testAccountId));
    }
}