Solution for opening Twitter links with Twitter App
HappyBadgers
Member Posts: 53
I want my users to be able to reach out to us through twitter, which is easy and convenient when you're on your phone. I was disappointed when I saw that the Open URL only allowed HTTP:// and not the twitter:// protocol I needed to open directly in the twitter app.
Then it occurred to me - I could create a PHP page on my website that detected whether or not you were on a mobile device, and then forward you to either to the website or the app depending. I wanted to share this with everyone because I think it's useful, and provides a better experience than sending someone to twitter in a browser when they're already signed into their app. And with the detection, you won't need to make an adjustment if you're also porting to desktop or web.
I'm posting my code on github - just put your own info in and upload to your site. Then in your game, just point the URL to this script on your site and it does the rest.
https://github.com/triola/twitter_for_gamesalad
Then it occurred to me - I could create a PHP page on my website that detected whether or not you were on a mobile device, and then forward you to either to the website or the app depending. I wanted to share this with everyone because I think it's useful, and provides a better experience than sending someone to twitter in a browser when they're already signed into their app. And with the detection, you won't need to make an adjustment if you're also porting to desktop or web.
I'm posting my code on github - just put your own info in and upload to your site. Then in your game, just point the URL to this script on your site and it does the rest.
https://github.com/triola/twitter_for_gamesalad