Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
637 views
in Technique[技术] by (71.8m points)

php - How to hide url from the tweet body when sharing on twitter through URL?

I'm sharing a page url on twitter using this anchor tag:

<a href="https://twitter.com/intent/tweet?url=<?php echo $url; ?>" target="_blank"></a>

and it works perfectly fine and displays preview of the URL in the tweet but I want to hide the URL present in the tweet body. See the attached image:

hide

How can I achieve this ?

Thanks in advance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

When creating a tweet, the URL will always be visible. However, as soon as the tweet is posted the URL is hidden automatically and only the preview of the page remains.

I tested this myself, and found this answer on: reddit.com/r/Twitter/comments


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...