directMessages

Top  Previous  Next

This function will query the direct message in the authorized account

Definition

twitter.directMessages( sinceId, callback )

 

Name

Type

Description

sinceId

string

ID of the last message received after which you want to retrieve messages.

callback

function

Callback to be called after operation completes.

Callback function signature

function ( status, messages )

 

Name

Type

Description

status

boolean

true if tweet was published false otherwise.

messages

array of message

The id of the published tweet.

Message Table

Name

Type

Description

recipientId

string

ID of the recipient

senderId

string

ID of the sender

id

string

ID of the message

senderName

string

Screen name of the sender

recipientName

string

Screen name of the recipient.

 

Example

twitter.directMessages( "", function( success, messages )

 

for i, message in ipairs(messages) do

   table.print(message)

end

 

end)

This will print

 

{ -- #0

   ["recipientId"] = "1432955723",

   ["senderId"] = "15643215723",

   ["id"] = "36697823415903360",

   ["senderName"] = "Promixis",

   ["text"] = "yow yow",

   ["recipientName"] = "Promixis",

} -- #0

Related

Twitter

Availability

Lua

Actions