The most popular Russian social network, VKontakte, recently hosted an event that JavaScript programmers have been waiting for for a long time. Now you can create your own iFrame applications to interact with the software API of this network. To do this, you can now use both Flash and JavaScript scripts and any other client-side technology.
This event is all the more significant because, despite the abundance of existing client technologies, JavaScript was and remains a good old technology that is widely used by Web developers, and if you paid attention to this note, then you probably have some understanding of this language. Therefore, the news that JavaScript will now allow you to use all the features of VKontakte cannot but please Web developers.
What are iFrame apps? On the VKontakte network iFrame application is an ordinary Web page that is intended to be displayed in a "floating frame" specified by the tag
iFrame applications can contain one or more pages. These pages can be either static or server-generated, or even client-side generated using AJAX technologies. To generate the content of these pages, you can use information from your own or from third-party servers of the "global network".
You can place HTML and JavaScript code on the pages of an iFrame application, as well as Flash, Silverlight and Java applets, if you see fit. iFrame applications will be able to use all the features of the usual, previously existing methods of the VKontakte network API, and most of the features previously available only to interactive Flash applications through a special Flash container.
The VKontakte network API can be called by sending a specially crafted request GET method at the addresses http://api.vkontakte.ru/api.php and http://api.vk.com/api.php. The choice of address depends on the address at which the network user works. The interactive capabilities of the VKontakte network interface are invoked by using the VK object of the xd_connection.js library, which is available at any of the addresses: http://vkontakte.ru/js/xd_connection.js and http://vk.com/js/xd_connection .js
The VKontakte API is a strictly client-side technology that can only be accessed from the client's browser, that is, directly in the client's browser from JavaScript or other browser-supported client technology.
The developer must firmly grasp that the VKontakte API can only be used on the client side, and therefore it is not worth trying to call the methods of this API from the server using PHP scripts, Python or Perl. There is no secret in this feature of the VKontakte API, just when calling the properties and methods of the VKontakte API from the client side server application VKontakte, which is responsible for API work, data is transferred from the cookies of the user currently working with the application.
This is done so that "Contact" can determine which user is working on the network and whether he has the right to perform these actions in the application. It's even easier for the developer of an iFrame application: you don't have to worry about security, "Contact" has already done this job for him.
In this news review, we do not undertake to describe the technology for developing iFrame applications for the VKontakte social network, and we will not consider the features of using its API in JavaScript scripts. Those interested can find out all these details from the official documentation of the VKontakte service, which can be found on the page "
To search for questions, you can use the search function for words or phrases on the page. To call this function, use the keyboard shortcut ctrl+f.
General issues
Verified account— an account with a linked (confirmed) phone number.
Questions related to the application
The secure key ensures the security of data transfer between your application and VKontakte.
1. Editing».
2. Go to the tab " Settings».
3. in front of you secure application key.
2. Select type " iFrame/ Flash application ».
5. Proceed to download the application.
6. Go to the application page, then to the section " Editing».
7. Go to the tab " Settings».
8. Change the state to " The app is enabled and visible to everyone” (very important! otherwise, many application modules will not work correctly).
9. Select application type " iFrame».
10. Enter the IFeame address: " http://appvds.ru/" (without spaces).
11. Enter the IFeame HTTPS address: " https://appvds.ru/" (without spaces).
12. Specify the size of the IFrame: 800 x 0 px.
13. Save your changes.
1. If you installed the "Custom template" extension, then in order for auto-height to work, wrap all content in
2. You may have set a negative or too low incremental height. Its value can be changed in the application settings in the application management on 3apps .
HTML
First, you apply to connect HTML in general to your account on this page.
The connection request status becomes: considered . On the same page HTML connections you can order a robot call. The robot will dictate a code that will need to be entered on the site, after which the HTML will be connected to the account. If for some reason you missed the call of the robot or simply decided not to order a call, then within 72 hours our support team will call you and clarify whether you have registered on the Free Apps website. You must answer in the affirmative. After that, the HTML will be connected to the account.
You can track the status of the application on the same page, or on the settings page (Account » HTML). As soon as the HTML is connected, you will receive an SMS notification about it.
If during the call your number is unavailable or busy, the HTML connection request will be rejected and the money will be returned to your balance. That is, then it will be possible to repeat the HTML connection procedure again.
Now the most important thing. You already have HTML connected to your account. Now it remains to connect it to desired application. To do this, go to app management on 3apps, then to the section " Settings" and click on the "Connect" button in the " HTML».
SSL
In short, in order for the application to work for that part of users (5-30%) who contact via HTTPS.
SSL is a protocol that provides security when browsing the web, exchanging messages Email And instant messaging, as well as when transferring data in other ways.
About 5-30% VKontakte users access the site through HTTPS(SSL). It is these users who are unable to access IFrame applications that do not have SSL support.
VIP seat extension
1. Install the extension " VIP seat».
2. Go to manage this extension.
3. Create a new VIP seat.
4. Copy the variable to paste the block and paste it on desired page as plain text to the place where you want to see the VIP seat block.
Create a table: 1 row, 3 (or how many VIP seats you need) columns. And in each column place a VIP block.
BB code example:
(VIP_12345)(VIP_12345)(VIP_12345) Where (VIP_12345)- variables of blocks of VIP-seats.
HTML example:
(VIP_12345) | (VIP_12345) | (VIP_12345) |
Use (VIP_N_UID), (VIP_N_UFN), (VIP_N_ULN) (N is VIP seat ID) to display UserID, first name and last name respectively. Example: if the block is called by a variable (VIP_12345), then the name will be called like this.
How to make an application on VKontakte
This article will help you try to create an application or a game on VKontakte on your own, tell you about the types of applications, their sources, and much more.
VKontakte - extremely popular at present social network. Not surprisingly, software developers are interested in it. Applications make communication more interesting, bring originality and novelty to it.
Self-creation of the application
Creating a VKontakte application is not an easy task. This requires certain knowledge and skills. The desire to learn and the desire for self-improvement are also essential. If you are interested in creating applications in VK, you should be prepared for the fact that you will encounter certain difficulties along the way.
Let's talk about how to create a VKontakte application yourself. At the first stage, you will need to read the documents that the VKontakte administration compiled for developers.
If you are interested in how to create a VKontakte application for free, you will need to follow the following link:. The docs say that all developed applications will use API. This abbreviation translates from English as application programming interface. In other words, this is a list of commands that can be used various programs In contact with.
Application types
Before you start thinking about how to create an application in VK, you need to know that there are two types of them on this resource. By the way, this is reflected in the documentation.
- Flash applications. They are files with the extension .swf. They are made in the environment Adobe Flash , then it is compiled into a file, after which it is uploaded to the server this resource or to your server.
- Iframe (iframe) applications. They can be done using various technologies provided by the browsers available today. Then a certain window will appear on the VKontakte page in which people can use this application. The program will transmit and receive data through JavaScript.
Instructional video
Anyone who wants to understand how to create a VKontakte application should see this process with their own eyes. After all, this way the information is perceived much better. The video will open your eyes to many questions.
We hope that now it has become more clear to you how to make a VKontakte application.
What you need to know
I would like to mention some programming languages And technologies which you will need to know. How to make applications in VK without knowing them? It's unrealistic. Here is the list:
- Adobe Flash
- Action Script
- 3D engines
- JavaScript
Learning all this will take certain time. Your success will depend solely on how many hours a day you are willing to devote to studying. A person who thinks day and night about how to make a VKontakte application, of course, will figure it out in the shortest possible time.
Application sources
Today, you can find the source codes of VKontakte applications on the network. Many can be downloaded for free on file hosting sites.
However, if you want to get the source of some specific application, follow this instruction:
So we got offline version of the source. In order to get the codes for the applications themselves, you will need decompilers . It will be necessary to work with their help on this file.
If all this seems complicated to you, it will be easier to download the source code of the application. However, keep in mind that the source code of not all programs can be easily downloaded from the Internet.
Paid App Development
Separately, it should be noted that the development of VKontakte applications in some cases is carried out for money by experienced people. This option is suitable for those who do not have the time or energy to get all necessary knowledge for self-creation. Application Development is the main activity for some people. The cost of the work is not too high, and if you can afford to pay for it, then by contacting a good specialist, you can get a really good result.
But if you want to learn how to develop an application yourself, then next instruction For you.
Application Creation Sequence
- Summary. You need to write on the sheet all the wishes regarding the future program.
- Design work. Need to draw buttons, backgrounds, as well as inscriptions.
- Programming. Should write functions And classes through which action will be taken.
- Work on bugs. It is recommended to look for errors and fix them.
- Placement of the code VKontakte.
Free programs
Programs for VKontakte applications can be downloaded on the Internet for free. First of all, of course, you need to download Adobe Flash. This is the main and main program that will allow you to start working on your project. This program to create an application is very convenient. However, it is not easy for a beginner to work with her. But over time, skills appear and it becomes easier to use it. Other programs for applications are also easy to use. 3D engines, for example, significantly speed up and simplify the process of creating applications.
The easiest way
If you want to create your program in the shortest possible time, use the VKontakte application designer. Free Apps
, for example, allows you to create an application in 5 minutes.
Now you know in in general terms how to write an application for VKontakte.
Question: Flash application as an iFrame displaying a website
Good day!
Friends, I ran into such a thing where your help with a flash is needed very urgently!
But the fact is that I don’t know it at all and I don’t even know what to write it on
In general, I will not beat around the bush and tell the whole point and what I need
Go:
In general, we are engaged in toys on Unity3D and write games for the browser
(Not about) purely lovers of poyuzat and just something to cheat
The fact is that we want to add toys to VK, where you can use them as an iFrame
That is, you pour them into free hosting and just point the link and that's it, the game works
but now a new feature has appeared there, 2 links are required,
the first one goes like http://domain.com/game.html
the first one goes as httpS://domain.com/game.html
Free hostings do not support HTTPS, well, that is SSL certificates
I went to the ruoff unity forum, where the guys suggested that take the application, switch not iFrame but Flash and upload a USB flash drive there
And create the simplest flash drive that will be like iFram, well, that is, the name.swf itself will be like iFrame and write your address there
In general, these are the swings, they don’t want to share how to do it, they try to sell the best practices as always, but I’m from the common people who have no skills or finances, and there would be another question - if the project was commercial, otherwise it’s all out of boredom usable...
I will be very grateful if someone chews what's what and how to do it!
Thank you for your attention!
Question: Create simple Flash Appendix
Help me please. I need to create a simple application for the site made in Joomla
Answer: if you want to create an application, then start with sketches or immediately from anim objects.
and then you can go to the code
for example there is a character Char
and there is a MapMC map
Question: Retrieving data from Flash on a page
Good afternoon, tell me how you can get data from Flash, which displays numbers on the page? Is this even possible or not? IN HTML markup this flash game everything has a look . Tell me what can be done? There is access to files on the hard drive, but how to find what exactly is responsible for this?
Added after 8 minutes
Maybe you can use some kind of Dump Flash Decomplier? But what to decompile?
Answer: Maybe this will help?
Question: Server response code and iframe update
Hello
I would like to implement the following: on the page, through the iframe, the site is displayed, if the site in the iframe does not load (the server response code of this site is not 200), then the iframe should automatically reload. And the auto reload goes on until the site response code in the iframe becomes 200.
Is it possible to implement this?
Found the page auto-refresh code