Access Camera through iPhone Web App - iphone

I understand that it is not quite possible to access webcam through HTML. So how about on the iPhone? Is it possible?

Starting with iOS6, You are able to access the Camera, and Photos using the<input type="file" /> input

Take a look at: http://code.google.com/p/iphone-photo-picker/
This was done by the NextStop guys, and is open sourced under MIT license. It basically uses an URL scheme to allow you to redirect a web user to a tiny native app long enough to take the picture, and then back to your web app to continue their experience.
I haven't used it yet, but I saw them demo it in a webcast and plan on using it myself when we get our mobile site done enough to incorporate it.

No. You can access the phone through the native API, but not via a web app.

Related

Detecting installed apps on iPhone with javascript or url

I am building a HTML5 based mobile web app for iPhone. I need to check whether user has specific application that I suggest. I heard that each iPhone application has unique URL scheme to detect their app indentity.
Therefore, I've read this article to get an idea.
Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?
However, this is not perfect answer to make what I am trying to make.
here is what might happen
User clicks a recommendation app on mobile web browser.
Check with application iTunes URL and URL scheme.
If the user has the installed application, it returns 'installed'
==> In this case, the screen returns back to mobile browser.
If the user does not have the installed application, it returns 'uninstalled'
==> In this case, the screen moves to App Store.
I am running mobile web app with PHP language.
Thank you.
this is not possible I'm afraid. To be honest I'm glad, as there are real privacy concerns if any old web page can detect which apps I have installed.
That's definitely not a good thing!
UPDATE: If you're happy to go native, this library will do what you want.. http://www.cocoacontrols.com/platforms/ios/controls/ihasapp
If you know that a url scheme for the app exists then you can open it via a web link like this, "myapp://". With this there are some round about ways you can effectively check if a certain app exists.
See this related stackoverflow post

Do I need a library for Codeigniter to create a Facebook application?

Do I need an entire library to crate a Facebook app with Codeigniter? I have not made an app for Facebook before the the developer documentation looked simiple. Beyond using my "secret" id for my app what else would I need to do to send my output via my view back to the facebook canvas? Are things more complicated than they seem? Don't I just output to my view as normal except things go to the canvas? Thanks.
No, you do not need a library. You can make all requests to the Facebook Graph api using cURL or any other method to call urls. However using the Facebook PHP SDK does help, it has a lot of helper methods that you'll find useful, do check this link to the documentation for the sdk, it's helpful.Hope this answer helps you.
p.s: And yeah you just output to your view as any other web app
No, you do not need a library, but it will make the process much smoother and take care of a lot of baseline functionality that you will need.
You might checkout my post here to see exactly how to integrate the offical facebook SDK within a codeigniter application as a stand alone library...

Can Facebook's "Single Sign On" be achieved within a mobile web app?

It's my first posting on here (although I've been using this site for reference for quite some time).
I've been trying for several days now to find or dream up a way to use Facebook's "Single Sign On" from within a mobile web app (not a native iOS or Android app) to automatically sign a user into a web app if they are already logged into Facebook from the native Facebook app on their mobile device for example.
My limited knowledge is telling me that it can't be done since the mobile browser and the 'system' (iOS for example) are too separated (I can't, I don't think, have my mobile web app use or access the native Facebook app on a mobile device in any way).
I have found and read the iOS, Android AND Mobile documentation provided by Facebook (https://developers.facebook.com/docs/guides/mobile/) which all seems to make enough sense, but after days of trawling through everything else I could find on the subject there doesn't seem to be a way to use, for example, the Facebook app on an iPhone or Android device to automatically log a user in to my web app if he/she is already logged into Facebook.
I've read lots about doing this from within 3rd party native apps and also other people trying to achieve a similar thing from within Desktop apps but I'm trying and hoping to be able to achieve this from a web app running within a mobile web browser.
I'd be very grateful for any help, opinions or pointers in the right direction since I think this would be an excellent step forward in UI for mobile web apps to have (not just the native apps).
Many thanks in advance...
Probably a bit late to the party but in case anyone else is wondering yes it's possible with Cordova/Phonegap and the Facebook Connect Plugin: https://github.com/davejohnson/phonegap-plugin-facebook-connect/
Using the FB.getLoginStatus() method at startup allows to check if the user is already signed in with the native Facebook App and retrieve its profile. More details in the examples provided in the repo.
I have not yet implemented it myself, but seems possible according to:
http://developers.facebook.com/docs/mobile/web/build/#login

How to go about building an iPhone app that accesses a website with a custom UI?

I don't quite know how to explain this but I want to build an app that can access a website like, for example, Facebook, but I don't actually want it to be Facebook's website in the sense that I want to design the UI. There is a couple of apps like this already in the app store, one being called "Facebook Touch HD". I have managed to get an app to access Facebook with UIWebView, but it just goes to Facebook's mobile website, obviously.
Look at the Facebook IOS SDK.
You probably want to fetch data from Facebook using its APIs. Facebook actually offers a library for iOS, so you may want to check it out.
In general, this applies to any site that offers an API. Usually you can use NSURLConnection to make requests to get the data you're interested in (check the specific API's documentation for details); then you have parse that data (most services output data in XML or JSON).

How can I add a link to an iPhone native app from website IF POSSIBLE

I have a link to a Facebook page from a website. I know I can use the URL scheme href="fb://" to open up the Facebook application from within an iPhone, but if the iPhone user does not have the native application installed, an ugly error message pops up. I would rather just send this user to the Facebook website.
There's gotta be a way to do this, but everything I've tried has had some short-coming:
Can't make a HEAD request to a different server
Can't run a try catch javascript function since the event leaves the client page
Can't seem to access information about the user's applications... or can I? I've read a bit about a cookie called "appInstalled" but can't find any real documentation about it.
Any ideas out there? Thanks a ton in advance.
Denis
Can a website determine if a device [iPhone] has certain applications installed ? I'm pretty sure that's a big NO because of privacy and security concerns.
Not a really technical answer, but you could change the user interface to give the user an option. For example, having:
Click here if you have the facebook application installed on your iPhone.
If you do not, click here to go through to the site.
Sorry that I cannot offer a "proper" solution, I'm not really that familiar with iPhone development.