Sms.canSend

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

This method is used to determine whether a user has enabled SMS for the application. Requires an active session, and is recommended only as a basis for design in terms of disabling certain elements or options that are conditional on this capability.

Parameters

RequiredNameTypeDescription
required api_key string The application key associated with the calling application. If you specify the API key in your client, you don't need to pass it with every call.
call_id float The request's sequence number. Each successive call for any session must use a sequence number greater than the last. We suggest using the current time in milliseconds, such as PHP's microtime(true) function. If you specify the call ID in your client, you don't need to pass it with every call.
sig string An MD5 hash of the current request and your secret key, as described in the How Facebook Authenticates Your Application. Facebook computes the signature for you automatically.
v string This must be set to 1.0 to use this version of the API. If you specify the version in your client, you don't need to pass it with every call.
session_key string The session key of the user who may have added the application.
optional format string The desired response format, which can be either XML or JSON. (Default value is XML.)
callback string Name of a function to call. This is primarily to enable cross-domain JavaScript requests using the <script> tag, also known as JSONP, and works with both the XML and JSON formats. The function will be called with the response passed as the parameter.
uid int The user ID of the user who may have enabled SMS for the application. If this parameter is not specified, then it defaults to the session user.

Response

This method returns 0 on success, or an error code.

Error Codes

CodeDescription
270 Permissions disallow SMS to the user.
852 User has met the quota (unsolicited message).
853 User does not accept SMS during this time.
854 Over application daily SMS quota/rate limit.

See Also

reference