Custom URL scheme for new Facebook iOS app - ios

Does anyone know what the custom URL scheme is to open a Facebook page in their new iOS app. I was using fb://page/PAGE_ID however this doesn't seem to be working in the recently updated Facebook iOS app, it just opens the app but doesn't go to the required page.

I got this answer at developer.facebook.com:
Replace the word page with profile and it will work. Your new statement will be:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"fb://profile/247377102029332"]];

Use https://graph.facebook.com/YOUR_USERNAME to get your page ID.
In your iOS app use: fb://profile/[your ID] and the facebook app will open to your page.

The URL scheme for the iOS Facebook application is:
fb://profile/(fbid)

Same problem here. fb://page/PAGE_ID is not working anymore.
Note that fb://profile/(fbid) wasn't working properly on Facebook 4.x returning a "corrupted" page in both iPad and iPhone. Instead, fb://profile/(fbid)/wall in Facebook 4.x worked well when using an iPad but didn't work with an iPhone.
fb://page/PAGE_ID was the only option that worked on both iPhone and iPad, based on my experience.
I used to use http://wiki.akosma.com/IPhone_URL_Schemes as reference, but it's currently down...

A custom URL scheme is a mechanism through which third-party apps can communicate with each other. It doesn't allow you the provision to open a page in that particular application. It just fires an event to bring the called Application to the foreground. Going through this documentation would further clear your doubts.
The new Facebook app is built using Objective-C as against previous once in HTML5 which used to support URL scheme mechanism. This link gives a hint on that.
http://techcrunch.com/2012/08/23/facebook-for-ios-faster/

Related

In Cordova/Ionic, How to open a Facebook profile link in the native app?

I am trying to open a user's profile in the native Facebook app on ios, if installed. The app is built on Cordova/Ionic and I use ngCordova inAppBrowser plugin.
Twitter links, for example, work just fine with a regular web twitter link (https://twitter.com/[username]). Facebook on the other hand, do not.
I have tried many different variations:
https://www.facebook.com/[username/user_id]
https://facebook.com/[username/user_id]
fb://profile/[username/user_id]
fb://profile?id=[user_id]
None worked.
What am I doing wrong? Is it even possible with the current version of the Facebook app?
Thanks
Just use: 'fb://profile'
In my case worked for both Android and iOS:
$scope.openFb = function() {
$window.open('fb://profile', "_system");
};
See this answer for further reference on custom url schemes supported by Facebook iPhone app:
What are all the custom URL schemes supported by the Facebook iPhone app?
Try this:
fb://profile?id=[username|user_id]
I've tested on Safari, it works as expected,

Open my app from facebook app

I have an application on IOS, which posts photos and location on facebook.
I want my app to open once user tap on link(When viewing facebook from facebook app). Is this possible?
It's not possible using the built in iOS sharing but Facebook will open your app if you are using their SDK and posting with a Facebook app. (as in an app setup in their developer portal) You need to have deep linking turned on and your app profile setup to point back to your app store id. They also have a new app links thing they announced which is worth checking out. In any case your app will have to support custom URL schemes.
Sorry I can not get clearly but if I am not wrong then do you want to open your iOS app when user click on link on FB ?
If I am right then simple and sort answer, it is not possible because apple iOS dose not provide any such types of feature/API so it is better to stop fighting.

Xcode - opening official Facebook App (5.0.1) not directing to proper link

I am using Xcode 4.5.1 (and iOS 6) and no Facebook SDK; I have been able to link to the Facebook app without problem before. However, my theory is that once Facebook released the 5.0 version of their official app, my link no longer works. It still opens the app, but it does not direct the user to my company's page, it either launches at the News Feed or it opens in the last state the Facebook app was in (i.e., in Messages, Friends list, etc.)
NSURL *facebookLink = [NSURL URLWithString:#"fb://page/316429551772278"];
[[UIApplication sharedApplication] openURL:facebookLink];
As I mentioned, this code has worked prior to Facebook releasing the major update; my question is if there is an alternative link I can use that will both open the app and direct the user to this specific page, or is this simply a Facebook bug?
Thanks!
Seems that replacing page by profile in the URL works.

iOS Facebook SDK 3.0 Login not redirecting to origin app

I recently updated my ios app to facebook sdk 3.0.
I did everything like describes here:
https://developers.facebook.com/docs/howtos/login-with-facebook-using-ios-sdk/
When I hit the Login with Facebook button everything works fine. The FB app is coming up, asks me for permissions BUT -> it doesn't redirect to come back to my app. It just stays with the FB app.
With the old SDK everything worked fine. Is it that the new SDK is not working with iOS 5?
I don't even know how to debug this...
Thanks for any kind of help!
UPDATE
It has something to do with my URL Schemes. Seems like ios SDK 3 doesn't like characters in the id. My former Scheme entry was fb0000000new where as the 0 are replaced by the app id. When I change that to just fb0000000 it works.
Would be good to have a link in the documentation though!
just try this its worked out for me
http://www.icodeblog.com/2011/03/28/facebook-sdk-posting-to-user-news-feed/

Launching a Facebook page from an iPhone app via QR code

I'm trying to create a QR code that launches a Facebook page from the app, rather than the browser on both Android and iOS.
Creating the code with fb://page/<page id>, works perfectly on an Android.
This was also supposed to work with iOS's Facebook app, but I think since Facebook updated their app recently from a HTML5 version to a fully native iOS app, that functionality has stopped working. It indeed opens the Facebook app, but it does not go to the page.
Has anyone else seen this happen since the app was updated a few weeks ago? And what string would I have to use to create a working QR Code for iOS's Facebook app?
We finally figured it out. FB changed it to fb://profile/ instead of "pages". It works across both platforms.

Resources