URL Scheme to open a post in facebook app - ios

How do I use the url scheme to open a facebook post in facebook ios app?
I got a thing while goolgling like "fb://post/"id""
but it does not work, it just opened the facebook app.

http://wiki.akosma.com/IPhone_URL_Schemes
This "works" but, then again, doesn't:
fb://post/
It only works if the Facebook app has previously loaded the particular post, otherwise it draws a blank.

u can use this link. this might help you
What are all the custom URL schemes supported by the Facebook iPhone app?
fb://profile – Open Facebook app to the user’s profile
fb://friends – Open Facebook app to the friends list
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

Related

How to open an iOS Application from Facebook,Twitter and Google+ posts which are shared from the iOS application using UIActivityViewController?

I have shared few posts to Facebook,Google+ and Twitter from my iOS application.How can I open my app when users click on those posts I have shared?I have used UIActivityViewController for sharing.
For Facebook you should use app links: https://developers.facebook.com/docs/applinks/ios. You can host links to your app with their hosting - https://developers.facebook.com/quickstarts/?platform=app-links-host
For Twitter you should use https://dev.twitter.com/cards/mobile/deep-linking but need the server side(hosting) with tags for link. Also, with default UIActivityViewController you cant do this.

How to make url that open in Safari for iOS Facebook Messenger app instead of in-app web browser

[iOS] I'd like to make facebook messenger bot that sends a URL. Once the URL is tapped, I want it to open the URL in native safari.app instead of an in-app browser in Messenger.app. I tried Safari-search URL scheme, but it doesn't work. Is there any way to open native safari by modifying URL without modifying iOS native source code because, you know, I can't make any change for FB messenger native app?
Typical scenario:
I am managing bot and send FB message with amazon product URL, let's say, https://www.amazon.com/gp/product/B00T85PMWY/.
The receiver tap the url.
Safari will open and show the page.
Open Facebook url in Safari instead of native app go get your answer

Xcode 7 + canOpenURL, how to have Facebook and Twitter to open my own app links

Before Xcode 7, it was working fine. When I post link like "myapp://mylink?id=1" on Facebook and Twitter for social media sharing, the users can click on it and it will open my own iOS app if it is installed. I know xcode 7 put limit of 50 url schemes that any app can ask "canOpenUrl" before actually proceeding with "openUrl". Apparently Facebook and Twitter both still checking canOpenUrl before opening the link (they open in a UIWebView inside their apps), and since they can't add all the world's apps' custom url schemes into their app plist because of the 50 limit, my app now can't be opened from FB and Twitter with my custom url scheme. Log shows following on the console:
Twitter[827] <Warning>: -canOpenURL: failed for URL: "myapp://mylink?id=1" -
error: "This app is not allowed to query for scheme myapp"
Now the question is, is there any way I can have it working like before, where users can click on some link (myapp://mylink?id=1) on FB and Twitter, then that opens my own app through custom url scheme?
FYI, I actually post link like http://myweb.com/link?id=1 on those sites, and the link is processed on my webserver based on the HTTP header request to decide to redirect to actual web, or if iOS then redirect to myapp://mylink?id=1, and if Android then redirect to another url scheme for android app etc. I tested with just posting myapp://mylink?id=1 link directly on Facebook and Twitter, and it's still not working giving same error.
Add on:
The iOS9 new rules is that you need to add following, up to 50 of them, to your app plist so that your app can query the OS for canOpenURL, but it also renders unusable for big apps like FB & Twitter:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>myapp-custom-url-scheme</string>
</array>
To me from my reading around researching this issue, the solution is:
either Apple should change this restriction to more rate limit based, so that abusing apps (like Amazon something) wouldn't use it to scan for all known url schemes to build statistics of app installs,
or Facebook and Twitter etc big social media sites should stop checking canOpenURL, and just go ahead and openURL without verifying.
or even better, we should build some centralized database for custom URL scheme name spaces, and both iOS and the other apps should use it for this kind of general purposes.
OK, Facebook and Twitter recently released updates that have fixed this issue now.
Seems like they are not checking canOpenURL anymore, and letting any app's custom url scheme to open, unless they are doing some other ways to validate it.

iOS Facebook Like Button Not Working With iOS App

Trying to add the Facebook Like Button to an iOS App. Followed the directions online and am seeing an issue.
Without the Facebook App Installed on Simulator (8.x, 7,x):
When pressing the F Like button, we see a transition to Facebook.com but then quickly returns to the iOS App. It does not go to the proper Facebook Like page where the user can like the URL passed.
In the iOS app, the openURL method is being called and the Facebook
wasHandled = [FBAppCall handleOpenURL: url sourceApplication: sourceApplication];
is being called and it returns YES.
Please note that we are also using the Facebook Login Button that is working fine in this app.
The user has already been authenticated with the Facebook Login Button at this point.
Any hints on this would be appreciated.
We are using Facebook iOS SDK 3.21.1
[Addition]
See this article
http://stackoverflow.com/questions/26529314/android-likeview-error
This is what we are seeing in the the URL Error Message in openURL
The like dialog is only available to developers and testers
Which kinda does not make sense? Regular users should be able to see the like dialog to like the item?
For Facebook Like Buttons on iOS and Android.
After you have integrated the latest SDK and you want to test....
1) You must use a Facebook Account that is either the Developer account for the app (the account that the Facebook ID for the app was created) OR a linked tester Facebook account to the Facebook Developer account.
2) You have to use this account to login with on for the App.
3) When testing a "BETA" banner will be on the target page.
4) If these are not in place, for iOS at least you will get an error message in the URL in the openURL routine in the AppDelegate. For Android you will get a "CANCEL" status in your onActivityResult routine.
The like dialog is only available to developers and testers
Hope this helps.
To fully enable the like button for production, please see Ming Li comments above.

Is it possible to deep link to a specific page or location in the Facebook mobile app on iOS?

Is it possible to include a link inside my mobile app that opens the native Facebook app to a specific page, event, post, or other location?
Thanks,
Ryan
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
E.g.
fb://post/(postId)
Then call like this:
NSURL *url = [NSURL URLWithString:#"fb://<insert function here>"];
[[UIApplication sharedApplication] openURL:url];
Source with LOTS more examples: http://wiki.akosma.com/IPhone_URL_Schemes#Facebook

Resources