Search code examples
twitter

Twitter query string


When i have in query string %20 twitter just cut off the url.

https://twitter.com/intent/tweet?url=49.248.29.163/planPage?Title=Religare%20Invesco%20AGILE%20Fund&classification=equity&text=Check%20this%20via%20@ReligareInvesco

Does anybody know the solution?

Link to twitter thread: https://twittercommunity.com/t/tweet-url-with-querystring-having-spaces/38295


Solution

  • As per the documentation for intents Your entire url needs to be URL Encoded.

    That means / becomes %3F and so on.

    In addition, the documentation says that the URL must be fully qualified. That is, it must start with https:// or similar.

    Finally, the spaces must be double encoded. That means the % symbol in %20 needs to become %25.

    The url parameter should be:

    https%3A%2F%2F49.248.29.163%2FplanPage%3FTitle%3DReligare%2520Invesco%2520AGILE%2520Fund%26classification%3Dequity

    You can test this at https://twitter.com/intent/tweet?url=https%3A%2F%2F49.248.29.163%2FplanPage%3FTitle%3DReligare%2520Invesco%2520AGILE%2520Fund%26classification%3Dequity&text=Check%20this%20via%20@ReligareInvesco