Here is my pseudocode for launching Twitter app. if the Twitter app is installed on the android device, the handler launches Twitter app to post message. but if there is no Twitter app installed on the device, the handler launches the web page instead. My code below is not working.. have any idea to make it work? It will be very appreciated if anyone advice me..
on postOnTwitter
local tURL, pBody
put url "twitter://post?message=" into tURL ##url of twitter app
if tURL is empty then ## if there is no Twitter app installed.
put "This is my message!" into pBody
launch url "http://www.twitter.com/intent/tweet?text=" & urlEncode(pBody)
else ## if there is Twitter app installed.
launch url "twitter://post?message=This is my message!"
end if
put empty into tURL
end postOnTwitter
Does Twitter still support write operations through their URL scheme? I had thought those were deprecated, but would love to be mistaken. Where can I learn more about their current URL scheme? Their dev site search is, shall we say, less than specific.
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Yes, URL scheme still works. If I command launch url "twitter://post?message=message here.", it directly launches Twitter app.
The question I am asking here is not how to launch Twitter app but how to launch twitter in webbrowswer if user doesn't have twitter app in their device.
Just I lke to know the method that figures out whether app is lauched or not. Any idea?
I haven't tried this myself, but I would imagine if you try a url scheme that isn't valid because the app isn't installed, "the result" would contain an error message. On the desktop an invalid url returns "The default action does not support this protocol."