Open sts-ryan-holton opened 11 months ago
Hey. thanks for info. Can you check what "$user" contains? Looks like it is not null?
Greets
I get the following error back on the $user
variable:
{
"user":{
"stdClass":{
"errors":[
{
"message":"You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product",
"code":453
}
]
}
}
}
This is how I want to send a message
/**
* Get the Twitter representation of the notification.
*
* @param mixed $notifiable
*/
public function toTwitter($notifiable)
{
$userIntegration = $this->getUserIntegration($notifiable->id, 'twitter');
if (! $userIntegration) {
exit;
return [];
}
try {
$this->createHistoryEntry('twitter', 'Monitor Test Notification', [], $notifiable);
} catch (\Exception $e) {
}
return new TwitterDirectMessage($userIntegration->schema->twitter_username, "This is your monitor test notification!");
}
$userIntegration->schema->twitter_username
returns the twitter username, without the @ symbol.
I have the following permissions:
Created with Read, Write, and Direct Messages permissions
And I'm on the free plan for the api
:wave: Hi,
Just reaching out as I've identified a problem with the
getReceiver
function, firstly, not quite sure why I'm getting the error in the first place, I'm using v8.0.0 of the package, getting the error:Presumably the error handling of the
$user->id
here needs to be more robust?