|
login Method
Description
This method begins the process for a user to sign in to the Truveo video search service using their AOL or AIM screen name.
Arguments
This method accepts the following arguments:
|
callback_url
|
String value. Required.
This is the URL to which the user's browser is
redirected upon completion of the log in process. For more details on how to properly use this URL, please refer to the
authentication spec.
|
Syntax
The following code sample illustrates how this method can be invoked:
TVS = new TruveoVideoSearch(appid);
...
TVS.login(callback_url);
Return Value
This method returns no value.
Response Data Objects
This method does not update any data objects.
Events
This method can fire the following events:
|
onerror
|
This event fires when an error occurs.
When this event fires, it will pass two arguments, 'errorCode' and 'errorMessage', to any handler attached to this event. The value
of 'errorCode' will be the numerical code assigned to the error and 'errorMessage' will be a text message that describes the error.
Event binding syntax: TVS.attachEvent('onerror', 'myHandler(errorCode, errorMessage);');
|
Errors
If execution of this method is not successful, the errors with the following error codes can be thrown:
|
1
|
Invalid request: 'appid'
An application ID was not submitted with the request.
|
|
2
|
Invalid request: 'method'
A method was not submitted with the request.
|
|
101
|
Invalid request: 'callback_url'
The callback_url parameter was not submitted with the request.
|
|
12
|
Service Unavailable
Truveo Video Search API service unavailable.
|
|
13
|
Method not found.
The method you submitted with the request was not valid.
|
|
14
|
Access Denied: invalid appid.
The application ID submitted with the request is invalid.
|
|
15
|
Access Denied: appid over limit.
The application ID submitted with the request is over the daily request limit.
|
|
109
|
SNS login failure.
The user could not login to SNS for some reason.
|
|
106
|
Invalid login attempt
The login attempted by the user is invalid.
|
|
501
|
Error connecting to XMLHTTP AJAX service
The Truveo video search AJAX service could not be reached.
|
|