top of page
romanlarionov589m3

Create Facebook App Using HTML5: A Comprehensive Course



You'll need to use an Facebook App that let's you create an iFrame or HTML tab. These come and go. We've had some success using the App Static HTML Plus, but we can't vouch for its reliability or security.


The individual blog post has a class titled "post" and is situated in the div with the class 'tab1' as this tab will be on the default-landing page. This then contains several anchor and span tags which will allow us to be able to style items such as the date and blog author in the native blue a la facebook. Once this 'post' div has been completed we can simply copy and paste it for the rest of the posts. Don't go overboard and clog up your code, keep it to around three or four as this will give us an idea as to how it will look and feel. I've also created a span with the class 'line' which is simply a horizontal line that we will use throughout the app.




create facebook app using html5



Another integral part of the CSS for Facebook apps is the buttons. I'm sure you'll want to use a few of these around your apps. We've created these not using a button, but instead an anchor tag with a span class inside it for the image.


We have a preload function, which we will call at app startup to load in the audio that we want to use. The key will be the string we use to reference a specific sound, and the asset will be the path to where that audio file is located. In the case of HTML5 audio, we just create an object that contains the key and asset. If we are using native audio, then we first preload the audio using preloadSimple and then we just store the key for both the key and asset values in the object (we won't need the file path to play the sound later). Once the appropriate audio object has been created, we push it into our sounds array.


The pom.xml created by OpenShift already has all Java EE 6 related dependencies. In order to use MongoDB, we need to add the MongoDB Java driver dependency. I am using the latest version of the MongoDB Java driver. Add the following dependency to pom.xml file. You can view the full pom.xml on github.


CDI stands for Contexts and Dependency Injection. We are using CDI in our application so that we can use dependency injection instead of manually creating the objects ourselves. The CDI container will manage the bean lifecycle and we as developers just write the business logic. To let the JBossEAP application server know that we are using CDI, we need to create a file - beans.xml - in our WEB-INF directory.The file can be completely blank, but it's presence tells the container that the CDI framework needs to be loaded. The beans.xml file is shown below:


Now that we know that the user's browser supports GeoLocation API, the next logical thing to do is to find jobs for skills specified by that user. This project uses Backbone.js to give structure to our client side code. If you are not aware of backbone.js then please refer to my previous blog, Building Single Page Web Applications with Backbone.js, JaxRS, MongoDB, and OpenShift where I talk about how to create an application using backbone.js. Please copy the app.js file to js folder under src/main/webapp. Below is the trimmed down version of app.js file. I have removed some parts for brevity.


In 2012, I helped my team create first mobile application using the Sencha Touch framework and PhoneGap Build. And, since then mobile apps have become an important part of my life. I have also experimented with several different frameworks such as Famo.us, Phaser and Ionic.


The loginForm() function we created is composed of a simple login form which asks the user for their name. We then use an if and else statement to verify that the person entered a name. If the person entered a name, we set that name as $_SESSION['name']. Since we are using a cookie-based session to store the name, we must call session_start() before anything is outputted to the browser.


Before destroying the user's name session with the session_destroy() function, we want to write a simple exit message to the chat log. It will say that the user has left the chat session. We do this by using the file_put_contents() function to manipulate our log.html file, which, as we will see later on, will be created as our chat log. The file_put_contents() function is a convenient way to write data to a text file instead of using fopen(), fwrite(), and fclose() each time. Just make sure that you pass appropriate flags like FILE_APPEND to append the data at the end of the file. Otherwise, a new $logout_message will overwrite the previous content of the file. Please note that we have added a class of msgln to the div. We have already defined the CSS styling for this div.


With an HTML5 magazine, you have more control over your marketing without having to rely on Apple's, Google's, or Zinio's existing audiences. You will pay for using most HTML5 magazine software platforms to create content, but they don't typically take a cut of your sales. Your magazines will exist on any URL you choose. 2ff7e9595c


0 views0 comments

Recent Posts

See All

Kommentarer


bottom of page