I have a website, www.website.com. This website includes three pages:-
Home Page www.website.com/home.php
Contact Page www.website.com/contact.php
Offer Page www.website.com/offer.php
Now I have created a web view app of my website (Native App)
A user having an android app, visits www.website.com/offer.php?root=yes from the browser.
What are the ways, so that the link opens in the app, rather than in browser?
I'd suggest you using this assistant, which is built in Android Studio. It's gonna add the necessary code for you in order to lead the users from those links to your App using App Links. Notice that this solution is available only from Android 6.0 (API level 23) or higher.
In order to support lower API levels, you should read this post and this documentation about Android Deep Links.
For your understanding, you should read this documentation about handling Android Deep Links and Android App links, and the difference between them. See which is better for your needs.
You can use deep linking
https://developers.tune.com/sdk/deep-linking-to-your-mobile-app-from-your-website
Here in the example one html code is given you can add the js code in your page and you can remove the setTimeout as it is redirecting to play store if you don't want to force user to install the app
Related
I have spent a lot of time reading FB dev docs and tutorials but I am still very confused with what canvas app and page tab are and how to use them.
What I am expecting from using FB SDK in my site is to have "continue with facebook" button on login screen , have a couple of share and like buttons and send notifications to facebook if user have allowed that. My site has internal messaging system and I want to notify users that new message or activity has happened in my site. In this way users would not have to check my site every day for activity which is important user experience as I expect rare activity(approx. few activities per week).
I have everything running but after user clicks on notification he is taken to canvas app. FB docs and tutorials focuses on code examples but I have not found anywhere description on what canvas app really is. Without this fundamental understanding I can not complete my notification logic, can not understand the terms involved like "secure canvas url" and basically does not feel confident about user experience(which I would want to make as great as possible).
If I google "what is facebook canvas app" I get "Canvas is an immersive and expressive experience on Facebook for businesses to tell their stories and showcase their products.". Apparently from comment below thats something else...
I would appreacite If someone could explain in plain word and maybe example what is canvas app and how should I use if taking into account that my main goal is to notify users about acitivity in my site to their fb account.
I am using CI framework PHP SDK v5.
Background
In Facebook, you create "apps" that run on "platforms". As a quick, very simplified summary, the three primary types of "platforms" that apps can run are:
A website that you host and control, but integrated with the Facebook Graph API (has Facebook Login, posting etc), but otherwise looks like a normal website. You host these on your own servers.
A website designed to sit inside an iFrame on the Facebook Platform. These apps will also generally interact with Facebook Graph. You still host them on your own servers but you have the added advantage that but can get limited information about the user when the page loads.
Stand alone programs (including mobile applications) that also interact with the Facebook Graph.
What you are talking about is the second of these - the iFrame on Facebook.
Facebook provide two ways to embed the application iFrame:
one is a canvas app. This has minimal surrounds for Facebook Header, Footer and a few ads on the right. It maximises your space. (e.g. https://apps.facebook.com/candycrush/?fbs=-1&fb_appcenter=1)
the other is a "page tab" (https://developers.facebook.com/docs/pages/tabs). This is smaller and designed to sit in a company's "Facebook Page" so has less space. As a marketer, however, it keeps everything more branded to your company. (Example: https://www.facebook.com/NutellaANZ/app/595447743881506/)
Note that a single app can run across all the above - canvas, a page tab and a stand-alone HTML page. With some shifting of the API, you can also wrap the same code for mobile and put on the app stores. A user can log in on your mobile app and you can have them logged in on websites and vice-versa (within some limits, but you'll need to explore those).
Games Only?
You are right in that most of the Facebook docs relating to apps refer to games.
Indeed a good place to start is https://developers.facebook.com/docs/games/gamesonfacebook which is where help leads you for Canvas Apps now.
But it doesn't have to be a game - so long as you're using the APIs anything will work. As you mention PHP, have a look at https://developers.facebook.com/docs/php/howto/example_access_token_from_canvas - no mention of a game, but is how you get information from the iFrame in PHP. (There's a lot more reading to do!).
Reading notifications
When clicking on the notification, Facebook will add parameters to the URL. Some of these are determined by the notification (see https://developers.facebook.com/docs/games/services/appnotifications) and others will help you get information about the user (https://developers.facebook.com/docs/reference/login/signed-request, https://developers.facebook.com/docs/php/SignedRequest/5.0.0).
So use this information server-side to work out who the user is and how you want to handle the user. But what experience you want to give the user once you're in the Facebook eco-system is up to you.
I've built a little mobile web app for the town I live in which aggregates a lot of info and makes it readable. Lately, on my android phone browser, when I go to a certain page it asks me do I want to open it with Browser or MX Android Player. I've looked at the request headers in Chrome and I can't find anything wrong with it. I've had someone test this on an iphone and the issue doesn't happen. Any ideas?
The site in question is http://sligo.me
The page throwing errors is http://sligo.me/Events.
This has nothing to do with your page. It rather has something to do with MX Android Player. Android allows its app to register for URLs to be handled through them. In this way if Chrome is installed on a phone and the user clicks on an URL the system will ask if it should use Chrome or Browser to open the URL. The user can now select a default app or make the choice every time she clicks on a URL.
An app can also register for some URL parts only. A good Twitter app would register for all URLs with the host Twitter and then display the content of that page inside the app.
I guess that MX Android Player registered for some URLs and the http://sligo.me/Events matches that filter. You could experiment a little bit and try to change the URL part that the filter matches. More information about this filtering can be found in the Documentation about Intents and Intentfilters
We have developed a magazine reader which is basically PHP application. Admin panel is built in PHP but when any user wants to read a particular magazine, it is handled by Flash i.e. we are embedding the .swf object with HTML in PHP page. But flash is not supported in iPad/iPhone. So we want to create this application in Xcode so that user can read the magazine in iPhone/iPad also. There is confusion how it can be accomplished. Does anyone has created any application similar to this??
Regards,
Vrunda Variya
If you want to have a Web app, you will have to go the HTML5, CSS, Javascript route, if you want to have your site but rather force iOS user's to view the content on a native app, just make sure you link them to your app, here is a tut on how to use Custom URL Schemes, here is a link to the Newsstand API Overview ( you need an Apple dev account ) a very solid way to distribute magazine like subscriptions on apps, and you get featured as a Newsstand app (read so you can understand it more it might not be what you need), I think you need to have a clear idea of what you are trying to accomplish so that you can decide on what are the best tools for the job.
Hope this helps!
I want to develop a Facebook application which shows the data from database from my own server.
I have found one question here : Can you use your own database for Facebook applications?
But like above question I don't want to use iFrame to show my content on Facebook application.
Any solution for this as, I am new to Facebook application development.
Edit:
Simplified version: I have a page in my server which generate xml feed of the product. So can I read this xml feed url in facebook Application?
Almost all applications use an iframe to display the actual app, I don't think you'll be able to avoid it. What you put into that iframe however is entirely yours. It runs from your server, and so can use whatever back end you prefer.
Why don'T you want to use iFrame? FBML & Iframes are only ways you can show your content with !
I am developing a facebook application that fetches the newsfeed of the logged in users and renders it. Currently, I am using iframe and I use PHP SDK to call the Graph API to fetch the posts and render them (generate on server side via PHP). To emulate the facbeook like look and feel, I mimicked their styles on which I am somewhat successful but not very much.
I am wondering is there a way in Facebook API to do the same for me? I read about the FBML but there is a deprecation warning along with a notice that they are gradually moving things towards their Javascript SDK.
Any ideas?
Well, you are narrowed to what XFBML (The Javascript API) offers you.
I had the same problem a while ago and this site saved me - http://devtacular.com/articles/bkonrad/how-to-style-an-application-like-facebook/
There are some basic styles that are used by facebook.
Good luck.