Dashboard.setNews
From Facebook Developer Wiki
Contents |
Description
This method publishes a message to be displayed alongside your application for the given user in the application and games dashboards. We do not require an active session with the user to do this. There is no limit on how often you can perform this action unlike other communication channels. Multiple calls to this function overwrite the previous setNews text.
Parameters
| Required | Name | Type | Description | |
| 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. | ||
| uid | int | uid int The user ID of the person to receive the message. | ||
| news | string | This is the string to be shown to the users it should be 120 characters or less and not have any consecutive capital letters. |
Example Requests
Setting a User's News
$message = 'you have 3 games waiting for your turn';
$facebook->api_client->dashboard_setNews($uid, $message);
Response
This call returns boolean which is true on success, and false on an unexpected failure. The call may also return an error code instead on failure.
Error Codes
| Code | Description | |
| 1 | An unknown error occurred. | |
|---|---|---|
| 200 | Permissions error. The application does not have permission to perform this action. |
