1. A computer-implemented method of controlling invocation of an application programming interface (API), the method comprising: at a computer having a processor and memory for storing one or more programs: categorizing a plurality of APIs according to a plurality of API categories, wherein the API categories are categorized by an API function through which user information is obtained; setting a default invoking permission for a respective API category; detecting, in real time, an attempt by an application to invoke an API in the respective API category; and upon detecting the attempted invocation of the API in the API category by the application, controlling the invoking behavior of the API by the application in accordance with the default invoking permission for the API category, wherein the default invoking permission for the API category may be altered by a user-selected current invoking permission.