Why we don’t have a Twitter characters counter
Why we don’t have a Twitter characters counterWhy there is no character counter for Twitter? Please add it, it should be easy.
It’s not that simple. Actually such counter is impossible to implement. Some parts of the message could be processed only after the blogpost is already published which makes it impossible to count characters at the time of writing.
Calculating number of characters for Twitter itself is not a problem. It’s it’s hard, it requires a very big JavaScript, but it’s possible.
The problem is in WordPress. WordPress is too powerful and has too many possibilities.
Here is an example.
Message format: %TITLE% – %URL% %CF-PRICE% %HTAGS% %HCATS% %HCT-PRDTAGS% – %EXCERPT%.
How to calculate number of characters?
Both %TITLE% and %EXCERPT% support HTML and shortcodes. There are also content filters that applied by WordPress and third party plugins. Some of those plugins apply their filters ONLY on the “view” action.
Example (title from the actual live website):
I just watched the movie “[movie-title-id-166]” – it was {great|awesome|hilarious|enjoyable}
How many characters here?
Once published this title could be:
‘I just watched the movie “The Imitation Game” – it was great‘ – 61 characters
‘I just watched the movie “The SpongeBob Movie: Sponge Out of Water” – it was awesome‘ – 68 characters
So how to get number of characters from %TITLE% and %EXCERPT%? You need to run a very extensive ajax call that will save the post draft and generate the view. People would want a “live” counter, so this ajax should be executed on each press of the button. That will degrade performance and still be slow. Oh and it could bring the wrong results, since it could save draft with “great” and publish the final post with “awesome”.
Next problem – WordPress does not save the tags along with draft. So we need a JavaScript that will scan tags. Even worse problem – custom taxonomies. We need a JavaScript that will analyze the DOM and find custom taxonomies in it.
And finally we came to the “impossible” part – %CF-PRICE%. This field is added by some plugin that has a very nice form for inserting the price of some custom product attached to the blogpost. There is no way to detect or parse this form since every plugin does it in it’s own unique way. This value can be obtained ONLY from the published post – there is no way to get it from the draft or from the interface.
Also let’s not forget custom post types. Those could have their own interface for everything including title and tags. How to get info from them?
The bottom line – the correct number of characters can be calculated only from the already published post. There is no way to get it on the fly.
Tutorials
How SNAP Sets Images
How SNAP Sets Images
All types of posts for Facebook, Google+, XING
All types of posts for Facebook, Google+, XING
How to format Facebook post with attached link
How to format Facebook post with attached link
All types of Facebook posts
How to format Facebook post with attached link
All types of posts to Facebook with video
All types of posts to Facebook with video
Why we don’t have a Twitter characters counter
Why we don’t have a Twitter characters counter.
Plugin Setup/Installation
All types of posts to Facebook with video
SNAP PRO Plugin Upgrade/Activation
All types of posts to Facebook with video
WP-Cron: Scheduling Tasks in WordPress
WP-Cron: Scheduling Tasks in WordPress
All Supported Networks
All types of posts to Facebook with video
How to check if curlSSL is working
WP-Cron: Scheduling Tasks in WordPress
How to completely remove SNAP
WP-Cron: Scheduling Tasks in WordPress
SNAP Features
Accounts
Settings
Powerful Filters
Set what posts go to each network based on categories, tags, type, format and many more criteria.
Limit Autoposting Speed
Custom URLs for AutoPosts
Autopost New Blogposts
Quick Post
"Spin" message post templates
Automatically change/alter the words or sentences in your social media posts
Emoji Support
Export/Import Plugin settings
Format your posts
Hashtags
Additional URL Parameters
URL Shorteners
See what was posted
SNAP Pro for Wordpress
Pro version upgrade adds the ability to configure more than one account for each social network and some additional features.
Latest Blogposts
Corrupted cache issue with SNAP Pro.
What happened? SNAP Pro is checking for API update every 6 hours. Today (May 22, 2019) around 6:30PM EST Google Cloud messed our update server for about 7 minutes. A bunch of "lucky" sites that were checking for update during those 7 minutes got their plugin cache...
Support for “Google My Business” is coming soon…
Support for "Google My Business" is coming this fall. Google recently made some kind of blog-a-like functionality available for local business listings. As a local business owner you can add posts, events, offers as well as products to your business listing. Although...
Facebook app review
We are getting a lot of questions about upcoming deadline for Facebook app review. People are asking what should we do. The honest answer would be: "No one has any idea". We submitted several apps for Facebook review using different ways of describing and explaining...
What happened with Facebook
What happened with Facebook? Facebook made changes to it's API access policy on May 1st, 2018. As the result we introduced our own Premium API for Facebook. We feel that we need to explain how exactly those changes affected SNAP. Since the beginning Facebook native...
Instagram issues
Instagram made some very big changes to authentication process. About 70% of our users are affected by them. Before the changes the process was quite simple: Sometimes Instagram decided that login from SNAP is "unusual" and asked for confirmation. You just had to open...