📜 ⬆️ ⬇️

OpenSocial on your bed


The purpose of this note is to tell about the possibility of installing the Open Social platform on your server with the prospect of integration into your social projects. Despite the assertion about the openness of technology, so far, except for market giants such as MySpace, Orkut, Hi5, and others, no one can boast of full support for the Open Social API. Of course, Open Social is a trend, and its integration will improve the position of any social web application. If you have it, or are planning, then I advise you to find out how things are going with the installation of the container for social gadgets.

Perhaps someone from Habrovtsev already tried to put Open Social on the server, and if there are any, it would be interesting to learn about your experience. I will tell about the.

But first...


... still need to conduct a brief excursion into the world of Google gadgets and the OpenSocial API. The only source of information on the development of social gadgets is Google Code . Google Gadgets are mini-applications written using Javascript and packaged in XML in a special format. I advise you to at least superficially get acquainted with the structure of applications, and watch the training videos. The videos illustrate how to create simple applications and how they work in the Orkut social network environment.
')
But we don’t need Orkut, now we are still interested in our own environment for launching gadgets.

It should be mentioned that the server part of the Open Social project, which should be a container for numerous social gadgets, is now under the wing of Apache and is called Shindig . The project is still young and lives in the laboratory, and is available for download only from the svn repository.

Structure



Two versions of the server live in the repository: for PHP and for Java. I will talk about installing the PHP version, for Java more documentation on the site of the Shindig project itself. In the repository, these versions are located in the java and php directories, respectively. Pay attention to the features directory - it includes modules vital for launching gadgets. In essence, these are Javascript APIs that will use multi-applications in their work. In the catalog, among other things, we can find the Open Social libraries versions 0.6 and 0.7, OAuth, etc.

Start the installation



- The first thing you need is PHP with support for curl, json, simplexml, that is, the version should be at least 5.2.2.

- Prepare the system, take the project from the repository . Attention, regardless of the choice of PHP or Java platform, you need to download all the files from the repository.

- For PHP, put them on a separate host and rename the php folder to htdocs (or www in Denver), in short, make it a web game.

- Now we can start the server. It is only here that we encounter undocumented difficulties for the first time. Running index.php itself does not make sense, you need to load at least one gadget into the container. Readme proposes to do it this way: http: /// gadgets / ifr? Url = http: //www.labpixies.com/campaigns/todo/todo.xml. Alas, it does not work, because the launch of this gadget lacks a locked-domain module. You can spend a lot of time looking for an error, but this module in the features directory will not really be found. Because we will try other options.

- Try the test options that are offered in the javascript readme directory. Alas, they will not start either :) They give a configuration error because they mistakenly read the oauth.json file from the config directory. Everything is easy to heal by removing oauth.json.

- And finally, you still installed the server and launched the first Google Gadgets. If you opened the shindig / gadgets / files / container / sample2.html (local address) page and saw in it 3 containers and 2 simple widgets that loaded into them, it means my recommendations helped you avoid the pitfalls I encountered.


Just below shows how they look at standard Google gadgets running in separate containers.

This is how simple gadgets in containers look

What's next


Google Gadget Server is finally working. You can try to insert new gadgets into it or install your own. Alas, some gadgets require inaccessible modules, and therefore the choice is very limited. But the simplest gadgets should work. I did not check either the Social API or the work with the repositories. However, this is an excellent lesson for tomorrow, and if I succeed in something, I will definitely write about it.

But I am not sure that the project at this stage is ready for integration into social projects. And if the file was used at every step during the installation, what will happen next? But almost half a year has passed since the release of Open Social, and it is still open only for those projects in which Google is interested. The Shindig project is developing, but it lacks documentation, there is no active community visible, and as we have seen it is full of glitches. On the other hand, social projects that want to declare themselves right now should look closely at Open Social, because in the long run this platform can bring great popularity to your social network.

Source: https://habr.com/ru/post/23799/


All Articles