ios Facebook custom url scheme to open user profile - ios

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"fb://profile/user.x"]];
fb://profile/[your ID] and the facebook app will open to your page.
fb://profile/(fbid)
I followed the steps above to open Facebook native app in iOS 8 but it does not work, is there a way to do this?
I mean twitter works perfect whats wrong with Facebook not updating their API!.
Thanks

As Ming Li pointed out in his comment, this is not officially supported. You can't deeplink to a user profile in the Facebook app.

Related

How to open any iOS App from my own App

What I want to do is open any iOS Application (Evernote, safari, Facebook, etc) from my own iOS application. For example, I have created my app with two simple buttons, the first one is named "Evernote" and the second one is named "Safari", so when I click on the "Evernote" button I want that the Evernote App launch on my iOS device, the same when I click on the "Safari" button I want that the button opens my Safari App. How can I do that? It is that possible? If it is, please tell me how. Thank you very much.
yes it possible if you known this app scheme reference URL.
Example call Tel app:
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"tel://"]]){
NSString *tell = [#"tel://" stringByAppendingString:phoneNumber];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:tell]];
}
Safari and other is same way.
List common schemes Url here : http://wiki.akosma.com/IPhone_URL_Schemes
Hope this link helps you.
http://code.tutsplus.com/tutorials/ios-sdk-working-with-url-schemes--mobile-6629
If you need to open external apps from your app then follow the above link. Or if you need to open the iOS native apps like phone, mail, safari, etc, you can use URL schemes for opening the app.

Get More Apps by developer

I'm developing an iOS app and I have a section "More Apps" in the app, where I have to display all the apps of the developer on itunes.
Similar like:
I have tried using itunes Search API, but couldn't get an expected result.
Can any one has idea how can I achieve this?
Besides comments above, you could simply jump to App Store.app for searching Apps by the artist name, using this:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"itms-apps://itunes.com/apps/[artist name]"]];

URL Scheme for Linkedin

I'm having an ios App. I'm able to open the linked native app from my ios App using the custom url scheme "linkedin://". But how to post a link to the linkedin native app through my ios App. Do we have any particular parameters for that?
What are the supported parameters for linkedin URL scheme?
Thanks, Thiagesh
Linkedin has changed the scheme, now it works in this way:
linkedin://profile/[id]
You can jump to a profile with:
linkedin://#profile/9999
I just tested this on my iPhone 5. Works like a charm.
There's more conversation here, but not much content.
http://developer.linkedin.com/forum/link-open-linkedin-profile-browser-ios-linkedin-app
If you get LinkedIn profile via LinkedIn REST API, then you can find publicProfileUrl field in JSON:
{
...
"publicProfileUrl": "https://www.linkedin.com/in/eugene-brusov"
...
}
Then this line of code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"https://www.linkedin.com/in/eugene-brusov"]];
redirects you to target profile opened in the native LinkedIn app if it's installed or to the profile opened in iOS default browser.
Tested on iOS 10.0.2 and 11.0.1.
Working on iOS 8.3:
linkedin://profile?id=[id]
Take a look to: http://pureoxygenlabs.com/10-app-url-schemes-for-marketers/

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.

Custom URL scheme for new Facebook iOS app

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/

Resources