Skip to content

Instantly share code, notes, and snippets.

@masarufuruya
Last active August 29, 2015 14:01
Show Gist options
  • Save masarufuruya/3cd616a1f1b44e81d279 to your computer and use it in GitHub Desktop.
Save masarufuruya/3cd616a1f1b44e81d279 to your computer and use it in GitHub Desktop.
Twitterの文字列を正確にカウントする方法 ref: http://qiita.com/masarufuruya/items/381f27b17c438dc174d2
$('#twt').val().length()
$('#twt').val().length()
ヤフー http://yahoo.co.jp
include_once('Twitter_Validation.php');
include_once('Twitter_Validation.php');
$validator = Twitter_Validation::create('', array(
'short_url_length' => 22,
'short_url_length_https' => 23,
));
$validator = Twitter_Validation::create('', array(
'short_url_length' => 22,
'short_url_length_https' => 23,
));
$twitter_count = $validator->getTweetLength($message);
$twitter_count = $validator->getTweetLength($message);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment