11

Some dev blogs have published information about the "fb://" url scheme for opening various views in the Facebook iPhone App. No matter how much I've searched, I haven't found one word from any official Facebook source about this.

Since the information is public anyways, I'm sure I'm not the only one who'd like to know, whether using this url scheme is officially approved, am I allowed to use it, does it work correctly, and if it's not approved, will it be and what's the approximate schedule for that?

Thanks in advance for any info on this subject!

  • Still to date, no updates on this? I can't find any certain info either. I'm facing (no pun) a problem where I want to link to a "Facebook page" (the concept of Facebook pages of a brand or something, not any page) from inside an iOS app. The url looks like: *https://www.facebook.com/readablepagenamehere* . Without the facebook app installed, opening that URL opens Safari and m.facebook.com/.... opens, successfully displaying the "Facebook page". However with Facebook app installed, the app is opened directly (indicating it also answers to https://www.facebook.com kind of urls, not just fb:) – Jonny Mar 13 '14 at 05:08
  • ...however in the app itself there are two problems: 1) The "Facebook page" is not opened. You're just shown your personal timeline. 2) If not logged into the Facebook app, it asks you to login whatsoever, before continuing. This is different from the Safari experience where you can browse a "Facebook page" without being logged in. I realized this should go in another topic, but essentially this is a question on official information from Facebook on the topic. – Jonny Mar 13 '14 at 05:10
  • Adding this link for relation http://stackoverflow.com/a/5707825/129202 – Jonny Mar 13 '14 at 05:14
  • Additional info (newer question!): http://stackoverflow.com/questions/12125780/custom-url-scheme-for-new-facebook-ios-app – Cᴏʀʏ Mar 13 '14 at 13:28

2 Answers2

2

It's for iOS only. The iOS API lets you define you own URL scheme, so Facebook must have developed their application to register the fb:// URL scheme on iOS devices. It's not a feature that was created by Apple, it's something you, the developer, can make up.

Here are some resources you can investigate

You can use it from your own applications on iOS, but only if the Facebook application is installed. There are, however, plugins and browser extensions out there that mimic the behavior by handling the fb:// schema on your desktop browser.

Community
  • 1
  • 1
Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
  • 2
    Thanks for your answer and the links. My choice of words was probably a bit unclear - I'm aware the 'fb://' scheme is iOS specific, and that it's created by Facebook/FB iOS App team, not Apple. When I asked whether using it was officially approved, I meant 'approved by the Facebook design team'. I have tested opening some Facebook pages from my app using the 'fb://' scheme, and indeed it opens them in the Facebook app - many views opened this way seem more or less broken or buggy, though, so I'm guessing this technique is neither official or approved. – Samuli Viitasaari Oct 28 '11 at 22:56
  • i'm getting this link in Chrome under Linux when I try to obey a request to "get your badge". – Michael Nov 10 '19 at 17:32
2

It's there to support the iOS push notification system (i.e. you get a push notification that says "Friend's Name tagged you in a photo", and you tap on it, it takes you straight to the photo).

I'd assume it's not intended for third party use and therefore subject to change. Hell, Facebook's public-facing APIs are subject to change on a whim anyhow, so I'd be especially cautious about something they hadn't documented.

Mike Ruhlin
  • 3,546
  • 2
  • 21
  • 31
  • Thanks, Mike. I think I'll settle to the Facebook in Safari workflow for now. I may return to this, if the "fb://" scheme gets officially encouraged by the Facebook team. – Samuli Viitasaari Oct 28 '11 at 21:03
  • 2
    That doesn't sound true at all. Push notifications don't use the custom url scheme mechanism to launch the app, and other apps that use Push notifications don't need to implement bespoke url schemes to work, so why should Facebook? – Nick Lockwood Mar 02 '12 at 10:27
  • You're right. It's been a while since I've worked with push notifications. Payload can be anything, not just a URL. I think I "heard somewhere" that that's why Facebook had those, but of course now so did anybody who read my answer :p I'd uncheck it if I could. – Mike Ruhlin Mar 02 '12 at 15:02
  • Ok, thanks for the correction, Nick & Mike. As to whether Facebook approves 3rd party use of the "fb://" url scheme, I still have no idea. "Everybody" uses the FB app nowadays, so linking to Facebook on Safari does cost me potential likes, but that's stable at least... – Samuli Viitasaari May 06 '12 at 19:28