Does anyone know the URL scheme for iOS to show a video in the facebook app?
For showing the profile I use
NSURL *url = [NSURL URLWithString:#"fb://profile/1727305929"];
[[UIApplication sharedApplication] openURL:url];
What is similar for a video?
For example, what is the URL scheme for this video link:
https://www.facebook.com/hanwel/videos/10200653642859965/?pnref=story
Thanks,
Hanno
Related
I've tried to use the code below but it keeps taking the user to show the website and I need it to take them to a application on the iPhone, ipad and ipod!
- (IBAction)fbIconGo:(id)sender {
NSURL *fbURL = [[NSURL alloc] initWithString:#"https:facebook.com/numberHERE"];
// check if app is installed
if ( ! [[UIApplication sharedApplication] canOpenURL:fbURL] ) {
// if we get here, we can't open the FB app.
fbURL = [[NSURL alloc] initWithString:#"https:facebook.com/NUMBER HERE"];; // direct URL on FB website to open in safari
}
[[UIApplication sharedApplication] openURL:fbURL];
You can do with:
NSURL *url = [NSURL URLWithString:#"fb://profile/<id>"];
[[UIApplication sharedApplication] openURL:url];
Schemes
fb://profile – Open Facebook app to the user’s profile
fb://friends – Open Facebook app to the friends list
fb://notifications – Open Facebook app to the notifications list (NOTE: there appears to be a bug with this URL. The Notifications page opens. However, it’s not possible to navigate to anywhere else in the Facebook app)
fb://feed – Open Facebook app to the News Feed
fb://events – Open Facebook app to the Events page
fb://requests – Open Facebook app to the Requests list
fb://notes – Open Facebook app to the Notes page
fb://albums – Open Facebook app to Photo Albums list
Your URLs should be changed to use the URL schemes instead , Look at these posts for the complete details,
http://wiki.akosma.com/IPhone_URL_Schemes#Facebook
Open a facebook link by native Facebook app on iOS
If you are trying to navigate to a page or a profile , the address should be as follows,
NSURL *url = [NSURL URLWithString:#"fb://profile/<id>"];
[[UIApplication sharedApplication] openURL:url];
You can use Apple URL schemes to communicate with other apps. Read DOCS Communicating With Other Apps
TO open facebook app use fb: URL scheme; i.e.
NSURL *url = [NSURL URLWithString:#"fb://https:facebook.com/NUMBER HERE"];
[[UIApplication sharedApplication] openURL:url];
I'm trying to open up the vine app when you tap a vine url from my app. Doing
NSURL *url = [NSURL URLWithString:#"vine://http://vine.co/v/biTaEEwdq2n?1"];
[[UIApplication sharedApplication] openURL:url];
Will indeed open up the app, but not navigate to the video. Any idea how this is done? Is it possible?
After looking at the Javascript on vine.co, I've found that the correct scheme for a post is : vine://post/<#id#> . So, let's try this vine://post/biTaEEwdq2n
It works for me.
Try using vine://v/biTaEEwdq2n or vine://video/biTaEEwdq2n as the URL.
The URL Scheme for the vine profile page is vine://user/USERID
Ex:
vine://user/126850376482649253
I'm building an iOS app with the Facebook SDK.
One of the things my customer wants is a button that launches the Facebook app and shows their Facebook page. Is there some way to do this, perhaps using a URL?
Thanks.
iPhone has a bunch of URL schemes such as:
NSURL *url = [NSURL URLWithString:#"fb://<insert function here>"];
[[UIApplication sharedApplication] openURL:url];
Check this site out for more:
http://wiki.akosma.com/IPhone_URL_Schemes#Facebook
Also check out this SO post for more info:
https://stackoverflow.com/a/10416399/738262
I'm working on something cool and I want to link to my Google+ profile in the iOS app.
Has anyone found out how to use the mgc:// URI scheme that the Google+ app on iOS provides to open a specific profile the way you can do it with fb://, twitter:// and almost every other account-based iOS app?
In fact it's really simple. Check your URL in a web browser and replace http:// or https:// with gplus://
Example :
If the URL in your browser is https://plus.google.com/u/0/100711776131865357077 then you open the profile in the app with the following code.
NSURL *gPlusUrl = [NSURL URLWithString:#"gplus://plus.google.com/u/0/100711776131865357077"];
if ([[UIApplication sharedApplication] canOpenURL:gPlusUrl]) {
[[UIApplication sharedApplication] openURL:gPlusUrl];
}
I know this is an old post, but I found the solution here (just search "google"). The URL scheme is gplus://. I have tested this myself and verified that it worked. Usage example:
NSURL *gPlusUrl = [NSURL URLWithString:#"gplus://"];
if ([[UIApplication sharedApplication] canOpenURL:gPlusUrl]) {
[[UIApplication sharedApplication] openURL:gPlusUrl];
}
I want to know a scheme to open a Youtube playlist.
I have this code:
if ([[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:#"youtube://playlist?list=PLgrYntDWyYDdHwZney5QoTDFQrphRmYoK"]]]//https://twitter.com/cms24es
) {
}else if ([[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:#"https://twitter.com/TmrrrsApp"]]]//https://twitter.com/cms24es
) {
}
I know a scheme to open a video, if I use youtube://, but to open a playlist instead I don't know how.
Well I guess youtube doesn't understand browser URL of playlist like this -
http://www.youtube.com/playlist?list=PLgrYntDWyYDdHwZney5QoTDFQrphRmYoK
Alternatively, go to your video->playlist -
Right click on the playlist and select "copy link address"
It provides a link something like this -
http://www.youtube.com/watch?v=ILwOQV32rHg&list=FLLpWow4PGIVkCJifJxrMfwA
Use this as a URI to play in native youtube app.
youtube://www.youtube.com/watch?v=ILwOQV32rHg&list=FLLpWow4PGIVkCJifJxrMfwA