twitter-kit-android
twitter-kit-android copied to clipboard
Can not tweet status including asterisk(*)
Bug Report
steps to reproduce
just make api request via StatusService#update
with status string including "*"
this request will return following response
{ "errors": [{ "code": 32, "message": "Could not authenticate you." }]}
Expected behavior:
TwitterKit should be able to tweet a status including "*" character.
Android API Version:
this should happen on all api versions
Android Device
this should happen on all devices
Artifact Versions
not sure about older versions, but this happens on v2.1.0, v1.14.1
current workaround
Define custom service interface and manually replace *
with %2A
solves problem. But IMO this should be treated inside the library(or hopefully api side).
interface MyStatusesService {
@FormUrlEncoded
@POST("/1.1/statuses/update.json")
Call<Tweet> update(@Field(value = "status", encoded = true) String status,
@Field("in_reply_to_status_id") Long inReplyToStatusId,
@Field("possibly_sensitive") Boolean possiblySensitive,
@Field("lat") Double lat,
@Field("long") Double longitude,
@Field("place_id") String placeId,
@Field("display_coordinates") Boolean displayCoordinates,
@Field("trim_user") Boolean trimUser,
@Field("media_ids") String mediaIds);
}
Thank you for the excellent bug report. We will look at getting this resolved for the next release.