Open native apps (Mail, Maps, SMS, Tlf, Youtube, Facebook, Twitter and more!)

mat0pad

  • Posts: 364
Some simple yet very useful schemes

How to use them:



Open map:
Code: [Select]
http://maps.apple.com/?q=ENTER_CITY
Show a map of fx Cupertino, California in the Maps app:
Code: [Select]
http://maps.apple.com/?q=cupertino
Get driving directions between fx San Francisco and Cupertino:
Code: [Select]
http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino
Open SMS to send text:
Code: [Select]
sms:TYPE_PHONE_NUMBERLike this:
Code: [Select]
sms:1-408-555-1212
Open phone to make a call:
Code: [Select]
tel:TYPE_PHONE_NUMBER Like this:
Code: [Select]
tel:1-408-555-5555If the phone app is not installed on the device, opening a tel URL displays an appropriate warning message to the user.

Open youtube video:
Code: [Select]
http://www.youtube.com/watch?v=VIDEO_IDENTIFIERYou need to replace the VIDEO_IDENTIFIER value with the identifier of the video you want to display.

Open mail:
You can also include a subject field, a message, and multiple recipients in the To, Cc, and Bcc fields:
Code: [Select]
mailto:foo@example.com?cc=bar@example.com&subject=Greetings&body=Wish%20you%20were%20here!
If the Mail app is not installed, clicking a mailto URL displays an appropriate warning message to the user.

Open installed twitter app with predefined page:
Code: [Select]
twitter://user?id=YOUR_IDLike this:
Code: [Select]
twitter://user?id=12345
Open installed facebook app with predefined page:
Code: [Select]
fb://profile/[your ID] – Open Facebook app to the user’s profile

Code: [Select]
fb://friends/[your ID] – Open Facebook app to the friends list

Code: [Select]
fb://feed – Open Facebook app to the News Feed

Code: [Select]
fb://events/[your ID] – Open Facebook app to the Events page

Code: [Select]
fb://requests/[your ID] – Open Facebook app to the Requests list

Code: [Select]
fb://notes/[your ID] – Open Facebook app to the Notes page

Code: [Select]
fb://albums/[your ID] – Open Facebook app to Photo Albums list

Open WhatsApp:
Code: [Select]
whatsapp://Send text from the WhatsApp Messenger application the predefined text and receiver(abid)
Code: [Select]
whatsapp://send?abid=YOUR_CONTACT_ID&text=Hello%2C%20World!
Open Facetime [iOS only!]
Code: [Select]
facetime://Open with receiver:
Code: [Select]
facetime://user@example.com
IMDb Movies & TV
The IMDb app URL schemes:

Code: [Select]
// with a search keyword:
imdb:///find?q=SEARCH_WORD

// with a title id:
imdb:///title/TITLE_ID

// with a name id:
imdb:///name/NAME_ID


imdb:///showtimes

imdb:///boxoffice

imdb:///chart/moviemeter

imdb:///chart/starmeter

imdb:///chart/top

imdb:///chart/bottom

imdb:///chart/tv

imdb:///feature/comingsoon

imdb:///feature/bestpicture

imdb:///feature/tvrecaps

imdb:///feature/borntoday


« Last Edit: April 07, 2014, 09:04:56 am by mat0pad »
   


                              

bonzero

  • Posts: 488
very useful "cheat sheet" I can only see the email and whatsapp "deep links" missing from the list hehe

mat0pad

  • Posts: 364
I'll jsut add those + facetime ;)
   


                              

bonzero

  • Posts: 488
awesome, this post is going to my favourites straight away, I like to implement easy-quick things using deep links and not having to fiddle with more sophisticated ways of doing these things, thanks

Stevetheipad

  • Posts: 1301
Very neat! Not sure how/if I'll use this but it's cool.


id8games

  • Posts: 205
I find that facebook;  fb://profile/[your ID] and Twitter; twitter://user?id=YOUR_ID
to not work.
The facebook URL scheme just takes me to my own news feed.
I have tried replacing [your ID] with "fb://profile/id8games" and I have tried "fb://profile/[id8games]" with square brackets around the ID, and on both instances I only see my own personal newsfeed.

With Twitter, on Android I get an error "Cannot get users at this time. Try again later". On iOS, it opens twitter, but shows me which tweats have my #tag in them.

Have these URL schemes changed? Are they working for anyone?

tarun766

  • Posts: 139
Does anyone know to to use hashtags?

Stevetheipad

  • Posts: 1301
How would I go about using the mail link to include the value of a attribute in the game in the body of the email?

Blogscol

  • Posts: 47
The facebook URL scheme just takes me to my own news feed.
I have tried replacing [your ID] with "fb://profile/id8games" and I have tried "fb://profile/[id8games]" with square brackets around the ID, and on both instances I only see my own personal newsfeed.

The ID of a Facebook page you get in this way: "https://graph.facebook.com/?ids=URL-OF-YOUR-FACEBOOK-PAGE"

Example: In the browser, enter this URL "https://graph.facebook.com/?ids=https://www.facebook.com/id8games"

Here you will see the details of your Facebook page along with your ID:

Quote
{
   "https://www.facebook.com/id8games": {
      "id": "49650238611",
      "can_post": false,
      "category": "Games/toys",
      "checkins": 0,
      "company_overview": "Established in 2008. The site is a games portal for some of the worlds best free games, and for the games created by Roland Machaalani.",
      "cover": {
         "cover_id": "10151021573448612",
         "offset_x": 0,
         "offset_y": 0,
         "source": "https://scontent-b.xx.fbcdn.net/hphotos-ash3/t1.0-9/s720x720/625517_10151021573448612_1670677482_n.jpg"
      },
      "founded": "Roland Machaalani",
      "has_added_app": false,
      "is_community_page": false,
      "is_published": true,
      "likes": 169,
      "link": "https://www.facebook.com/id8games",
      "mission": "To create memorable, addictive and challenging games.",
      "name": "id8GAMES.com",
      "products": "Free online flash games.\nMobile phone games.",
      "talking_about_count": 0,
      "username": "id8games",
      "website": "http://www.id8games.com",
      "were_here_count": 0
   }
}

The result would be "fb://profile/49650238611" with this Facebook app will open and send the user to your Facebook Page

id8games

  • Posts: 205
Thanks Blogscol,

I tried this on an iPad3, and it still opens the Facebook app, but directs to my personal feed.
What is interesting is that I then deleted the Facebook app, and when I tried my app again, this time it opened the default browser and took me to the correct Facebook page.

So from what I have worked out, on an iPad3, the Facebook app does not recognise these URLs, but the browser does.

Do you think Facebook has changed how these URLs work with their app? From what I understood from the below link, I think Facebook has a new way of "deep linking".

https://developers.facebook.com/docs/ios/app-links/

Neotron

  • Posts: 475
Is there any way to open Google Play store app with open url command?
I mean some kind of "market://details?id=package name" will open google play store app?

mat0pad

  • Posts: 364
Is there any way to open Google Play store app with open url command?
I mean some kind of "market://details?id=package name" will open google play store app?
Yep this does it:

market://details?id=THE_PACKAGE_ID

And then of course replace THE_PACKAGE_ID with your own ;)
   


                              

id8games

  • Posts: 205
Anyone manage to get ""fb://profile/xxxxxxx" to work on iOS ?

mat0pad

  • Posts: 364
Anyone manage to get ""fb://profile/xxxxxxx" to work on iOS ?
It works without problems just type the right! page ID and put it in an open browser block.

Fx mine is:  fb://profile/690725217610370         and this works for me