I want to create link for Whatsapp message which contain web URL with "+" on it.
Message will be something like this:
Hello GREGORY please visit this link:<new_line>https://winvitation.id/premium-8/?to=GREGORY+from+TIMBUKTU&app_absent=1&lang=id
But when I put it to Whatsapp "API" message like below:
https://wa.me/0000000?text=Hello%20GREGORY%20please%20visit%20this%20link:%0ahttps://winvitation.id/premium-8/?to=GREGORY+from+TIMBUKTU&app_absent=1&lang=id
When it got in to Whatsapp it will looks like this:
See that the "+" in URL is replaced with "space" and the link is not working as intended anymore.
How do I keep the "+" in URL?
Ah, just found it!
Simply replace the "+" with "%2B"....
Related
I was wondering if there was a way to find a URL when I am missing the middle. For example, I know that the beginning will be https://welldressedwolf/products/
and the end will be pretty-things but I do not know the middle portion.
With javascript you can get the full URL using window.location.href
After that you can remove the parts you dont want and you will have the middle.
More info: https://www.w3schools.com/js/js_window_location.asp
If you're looking to manually look up the address of a page, you could do so with a google search that specifies the site.
Try a site specific google search using something like the following:
"pretty things" site:welldressedwolf.com
I have a code which successfully posts pins on boards which do not contain whitespace characters, such as "mysocialboard" . But when I try to post on boards which contain whitespace characters, such as "my social board", it gives an error of board not found.
I have tried using urlencode() and urldecode() functions but they do not help.
I am using PHP in codeigniter.
just post the board id replace the / param.
it works. though the their api document just not say
It's not documented anywhere but while posting board name you need to replace white-space by - in board name. e.g. you need to do user/board-name instead of user/board name.
If you are doing it in PHP you should do...
str_replace(' ', '-','my social board')
I'm trying to set up a Twitter share url but it seems to reformat what I'm adding to the url when posting.
What I want:
Hey! Check out the latest #JamesBond DVD at www.example.com
Code:
Tweet-The format I want
<br /><br />
Tweet-Kind Of Half Works - Puts the URL in the wrong place..
What I'm getting:
Hey! Check out the latest
Hey! Check out the latest http://www.example.com/ #JamesBond DVD at
I've fiddled what I have here: https://jsfiddle.net/qnaqmhhL/1/
The format I want is - Text >> Hashtag >> Text >> URL
Any help would be great!
You need to URI Encode the special characters. So, for example # becomes %23.
https://twitter.com/intent/tweet?text=Hey!%20Check%20out%20the%20latest%20%23JamesBond%20DVD%20at%20www.example.com
Clicking on that link will populate the Tweet in the format you want.
I am using the following code to show a page with a Twitter box already filled in with a message:
Click me
However, on the page, I am getting this inside the Twitter box:
myMessage/
Note the trailing slash. Any ideas how to fix this?
We have found a workaround for this, where you add the source=webclient parameter, crucially, to the END of the twitter address. When you do this, Twitter no longer adds the trailing slash. However, given how Twitter like to change their formats and codes around, there's no guarantee this will work forever :-)
For example...
Twitter this
No, the solution is more simple. URL-encode your url :
https://twitter.com/intent/tweet?text=myMessage&url=http%3A%2F%2Fmyurl.com
Add a trailing slash to your URL and that should go away. It worked for me.
Change the URL from this:
http://www.twitter.com/share?url=http://myurl.com&text=myMessage
To this:
http://www.twitter.com/share?url=http://myurl.com/&text=myMessage
As Twitter documentation claims (twitter original reference):
A fully-qualified URL with a HTTP or HTTPS scheme, URL-encoded.
Fully-qualified URL requires to have trailing slash.
From the same documentation:
Example Value: http:%3A%2F%2Fexample.com%2F
Note, that the example has %2F at the end, which is HTML encoded / character. Twitter tries to create correct URL by appending / automatically.
Set your url GET parameter to http://myurl.com/ to get rid of the trailing slash
I have some Javascript that uses Twitter API to get tweets. I parse the data and use jQuery to generate HTML for the DOM.
An aspect of what I want to display is a "View this tweet" link -- yeah, sorta sounds silly, but it allows a user to get a URL for a specific tweet.
I am generating an a tag with an href. The URL is of the form:
http://twitter.com/{twitter-user-id}/status/{tweet-status-id}
where the content in curly braces is actual data extracted from the tweet (no, I am not including the curly braces). For example:
http://twitter.com/Atechtrader/status/57432099984130050
What happens in operation is that this works for some tweets, but not others. For the ones that fails, the Twitter server responds with content that says the requested page does not exist.
Am I doing something wrong?
https://twitter.com/statuses/ID should work.
it will redirect to the needed status.
Unfortunately, all of the answers provided so far rely on an HTTP redirect.
The direct link is of the form: https://twitter.com/i/web/status/{tweet-status-id}
FYI: id_str is the variable you need to call instead of id
id_str should be taken from the tweet object and replaced in
https://twitter.com/statuses/[id_str]
You can use like:
http://twitter.com/itdoesnotmatter/status/[YOURID]
Twitter redirect based on status ID not username.
It works for desktop and mobile.
You can use
'https://www.twitter.com/'+ user.screen_name+'/status/' + id_str
I've been tried it. It's work good:
- Web : https://twitter.com/statuses/ID
- Mobile && Web: https://twitter.com/User_ID/statuses/Tweet_ID
I hope it's helpful for you.