Comments (5)
Hi,
Thanks for the problem report :)
I've spent some time looking and I think the problem is the TextAsHtml function. I believe the twitter entity indices are true 'character' positions, but the string/stringbuilder methods used to parse and update the original string are really byte based (regardless of what the docs might say). I've seen/suspected this before but never found a solution.
In your sample tweet the first url entity has a start index of 106, but the string functions being used only return the correct text if position 110 is used. The additional 4 bytes seem to be because each of the emoji/smiley characters is actually 2 bytes but being treated as 1. I think this can be solved using System.Globalization.StringInfo to measure actual characters, but I've run out of time tonight to try and produce a solution.
from tweetmoasharp.
Hi,
I think I may have fixed the problem. I've pushed a new build to nuget, could you please update your solution and try again to see if this helps?
Thanks.
from tweetmoasharp.
Hi,
Any chance you've tried the update? Can I close this issue?
Thanks.
from tweetmoasharp.
Thanks for your speedy response! This indeed fixes the issue so it can be closed. Thanks again.
from tweetmoasharp.
👍 Thank you!
from tweetmoasharp.
Related Issues (20)
- Video's in Direct Messages HOT 1
- Support new direct_messages/events API HOT 27
- Fetching 280 character tweets HOT 3
- Platform Support HOT 2
- Update Json.Net Dependency HOT 1
- NuGet package contains old assemblies? HOT 2
- Direct message events are all Created At System.DateTime.MinValue HOT 2
- No rate limiting feedback HOT 3
- ListDirectMessageOptions.Cursor is the wrong data type HOT 4
- No Media being returned using ListTweetsOnUserTimeline HOT 4
- If TLS 1.2 is not used, then AuthenticateWith fails without an error HOT 4
- Tweetmoasharp works locally but not remotely HOT 4
- No search option for "tweet_mode : extended" HOT 2
- No media detected in tweet that has a photo HOT 4
- TextAsHtml property throws an exception when TweetMode is 'Extended' HOT 4
- AddListMemberAsync Long response time and request sometimes aborted HOT 3
- Unmarkdown the LICENSE.md file
- Assembly Newtonsoft.Json Issue. HOT 1
- Support for alt_text in media uploads HOT 1
- C# birden fazla tweet atmak
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tweetmoasharp.