You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Codebird for php for Twitter since it came out and now have version 3-1-5.
With this I've been trying to develop a direct messaging app and seem to have a whole lot of problems I can not figure out how to fix, thus I need your input on how to solve these issues.
Here is my code:
public function __construct($CKey,$CPriv,$APIK, $APIP,$ForWho = null){
ob_start();
$this->twitter = new TwitterMessages($CKey,$CPriv,$APIK,$APIP,$ForWho);
$SleepTime = 4900;
if (ob_get_level() == 0) ob_start();
$this->ConsumerKey = $CKey;
$this->ConsumerSec = $CPriv;
$this->APIKey = $APIK;
$this->APISec = $APIP;
$this->ForWho = $ForWho;
date_default_timezone_set('America/New_York');
}
I think I know where the problem is. In codebird, the function _getSignature breaks the array you send down to a string, but when you have a multidimensional array, which seems to be needed for Twitters new direct_messages/new command, codebird doesn't recognize the multidementions and for the event portion just gives blank array without any of the values within it.
I also tried using the old codebird/twitter version of direct_messages/new, which used a single dimensional array, and that came back with a 404 status and a 'Sorry that page doesn't exist'. Even though it does exist. Thus Twitter seems to expect a multidimensional array now.
Note to all. When you want to do the direct message events new and use a picture do not use the media_category field. Even though you can use it to tweet a pic, I've found that for DM's it is not as useful.
I've been using Codebird for php for Twitter since it came out and now have version 3-1-5.
With this I've been trying to develop a direct messaging app and seem to have a whole lot of problems I can not figure out how to fix, thus I need your input on how to solve these issues.
Here is my code:
public function __construct($CKey,$CPriv,$APIK, $APIP,$ForWho = null){
ob_start();
$this->twitter = new TwitterMessages($CKey,$CPriv,$APIK,$APIP,$ForWho);
$SleepTime = 4900;
if (ob_get_level() == 0) ob_start();
$this->ConsumerKey = $CKey;
$this->ConsumerSec = $CPriv;
$this->APIKey = $APIK;
$this->APISec = $APIP;
$this->ForWho = $ForWho;
date_default_timezone_set('America/New_York');
}
Within the code on the $reply I am always getting:
code = 32
message = "Could not authenticate you."
httpstatus = 401
From past experiences with this error I've realized that this means something is wrong with the way I am sending the request.
So can anyone help in this problem I am having?
Frank
The text was updated successfully, but these errors were encountered: