On iOS 6 and iOS 7, if I share the text:
www.google.com is such a cool website, I really enjoy going to it. You should check out the other one too! www.facebook.com
It says the text is too long by -15 characters. However, if I share the same text on Twitter.com or from OS X, I am fine (by 3 characters).
I am using a UIActivityViewController to share via UIActivityTypePostToTwitter. Just sending it to the UIActivityViewController as a NSString.
It appears as though the URL shortening is completely broken on iOS. How can I work around this?
Just ran into this today - it looks like if you type out a 109 character tweet and then add a URL of any length, then the post fills up and you have 0 characters left. So it looks like instead of URLs being 22 characters long as documented on Twitter, on iOS they are 31 characters long.
I confirmed this with a URL that is 27 characters long and then the rest of the tweet was 113 characters. This should have been the exact limit of 140 characters, but instead the share sheet (aka UIActivityViewController) said it was over the limit by 4 characters.
I did the math for your example and found that it is 123 characters, but subtracting out 14 for www.google.com, 16 for www.facebook.com, then adding in 31 each URL, you get 155 characters, which is where you get the -15 characters in your question.
tldr: Any URL shared to Twitter via UIActivityViewController is counted as 31 characters.
Related
I am trying to implement a Facebook messenger bot. I have trouble with the bot replying with a response that contains large amount of words. Is there a limit to the number of words that can be used in a response?
P.S : It works fine otherwise
As described in the doc, text message must be UTF-8 and has a 2000 character limit.
There are other restrictions in template for field title, subtitle & call-to-actions button.
Looks like, the limit has been updated to 2000 characters now.
Source: https://developers.facebook.com/docs/messenger-platform/reference/send-api#request
I have a page with user submitted photo galleries. I'm using the facebook API to share the photos. It shares the page with a query string. When the query string is present, it sets all the open graph properties on the page . This works great except when the image has white space characters on the file name.
I have tried replacing the whitespace characters with '%20' as so
http://example.com/gallery/images/large/this image.jpg
to
http://example.com/gallery/images/large/this%20image.jpg
But the facebook parser doesn't like that either.
Is there a way to scape these characters or am I going to have to go back and change it so that it replaces when the images get uploaded?
Answering your question (being it old), Now (in June-2017) Facebook parser works with whitespace characters when escaped with '%20', hope it would help someone looking for solution.
So, convert whitespace to %20 as depicted below:
http://example.com/gallery/images/large/this image.jpg
to
http://example.com/gallery/images/large/this%20image.jpg
Server side language has pre-defined function for that e.g. rawurlencode in PHP.
I don't think so. The facebook parser doesn't take whitespaces into account. Even if you use a redirect you will have issues later on. So it's better to just adjust your URLs now.
I'm trying to create a like for box my clients FB page:
https://www.facebook.com/pages/Cateringinventardk-alt-til-dit-storkøkken-og-café
I guess that little ø or é is messing it up, I got this error:
*The href parameter must reference a valid Facebook page, but "https://www.facebook.com/pages/Cateringinventardk-alt-til-dit-storkøkken-og-café" is not a valid Facebook page.
Anyone who know how I can prevent that with special url/code?
Thanks in advance!
Jan Joergensen
You could try and specify a url-encoded value for the URL. For the URL you supplied this would be something like this:
https%3A%2F%2Fwww.facebook.com%2Fpages%2FCateringinventardk-alt-til-dit-stork%C3%B8kken-og-caf%C3%A9
I've always used this tool, but any other url-encoding tool should do the same job. You might not need to encode the entire URL but rather only the "problematic" characters. For you that's everything after /pages/.
Cateringinventardk-alt-til-dit-storkøkken-og-café
Would become
Cateringinventardk-alt-til-dit-stork%C3%B8kken-og-caf%C3%A9
^----^ ^----^
encoded ø encoded é
I had to use the full url, not just the page vanity url
In Drupal 7, My Facebook feed is displayed in a View. The mapping is set for title to title and body to body. But the Facebook post is getting truncated at80 characters followed by (...) example: EmC’s Direct-Hire Construction team was recently honored for achieving more tha...
i mapped a bunch of items to the Body but still doesn't show the whole paragraph? The view and CCk type is set up to display the full node and not the teaser. Should I use a Parser or add a embed field? My Flickr feed is doing the same thing. I am using the Drupal 7 and the Feeds module. My Youtube and Twitter feeds work fine.
open your database and check body fields of this content type - if it consist from 80 char, the problem in creating field from feed (maybe that's some nuance of facebook api).
if body consists of more than 80 char - you have the problem with views setting, maybe it's adjusted to show body field like teaser or limited to 80 characters.
I am using the likebox.
I am getting some strange results.
On Google chrome:
Says 7 likes, Shows 6 people, 7th person is the last "liker" repeated another time.
On Internet Explorer
Says 6 likes, shows 4 people.
On Firefox
Says 6 likes, shows 4 people.
Live example:
See the fan box on the right
What is causing this?
How can I fix it?
What is causing this?
The content of that box is generated by Facebook. You cannot change the way it works in any way. If it's displaying the wrong thing, then that's Facebook displaying the wrong thing.
Bottom line: You just have to live with it.