X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftwitteroauthclient.php;h=e37fa05f0a6214c140ab71dab264c9f200702496;hb=3bc55e7b8bff2fe331371333de9ff4f96c8584d2;hp=e8f6e21ba9228d20dff828a8ef77761db780456a;hpb=be5d113fc684fcbe41b8374c62bfeb0f267216b7;p=quix0rs-gnu-social.git diff --git a/lib/twitteroauthclient.php b/lib/twitteroauthclient.php index e8f6e21ba9..e37fa05f0a 100644 --- a/lib/twitteroauthclient.php +++ b/lib/twitteroauthclient.php @@ -22,12 +22,12 @@ * @category Integration * @package StatusNet * @author Zach Copley - * @copyright 2008 StatusNet, Inc. + * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -if (!defined('STATUSNET')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -81,6 +81,15 @@ class TwitterOAuthClient extends OAuthClient return new OAuthToken($vals[0], $vals[1]); } + static function isPackedToken($str) + { + if (strpos($str, chr(0)) === false) { + return false; + } else { + return true; + } + } + /** * Builds a link to Twitter's endpoint for authorizing a request token *