private bool IsVerified(long uid, bool isAsync, IsVerifiedCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.users.isVerified" } }; Utilities.AddOptionalParameter(parameterList, "uid", uid); if (isAsync) { SendRequestAsync<users_isVerified_response, bool>(parameterList, new FacebookCallCompleted<bool>(callback), state); return false; } var response = SendRequest<users_isVerified_response>(parameterList); return response == null ? true : response.TypedValue; }
/// <summary> /// Returns whether the user is a verified Facebook user. /// </summary> /// <example> /// <code> /// private static void RunDemoAsync() /// { /// Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey)); /// api.Users.IsVerifiedAsync(Constants.UserId, AsyncDemoCompleted, null); /// } /// /// private static void AsyncDemoCompleted(bool result, Object state, FacebookException e) /// { /// var actual = result; /// } /// </code> /// </example> /// <param name="uid">The user ID to verify.</param> /// <param name="callback">The AsyncCallback delegate</param> /// <param name="state">An object containing state information for this asynchronous request</param> /// <returns>This call returns true for a verified user; false for an non-verified user.</returns> /// <remarks>This method is currently broken on Facebook's side (it only returns an empty XML element). A bug report has been filed here: http://bugs.developers.facebook.com/show_bug.cgi?id=5129 .</remarks> public void IsVerifiedAsync(long uid, IsVerifiedCallback callback, Object state) { IsVerified(uid, true, callback, state); }