{"id":181007,"date":"2013-05-26T22:54:02","date_gmt":"2013-05-26T18:54:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=181007"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=181007","title":{"rendered":"<span class=\"post_title\">\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432 PhoneGap \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 Facebook, Vkontakte \u0438 Habrahabr<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/phonegap.com\/uploads\/artwork\/Build-Bot-Preview.png\" alt=\"PhoneGap\" align=\"left\"\/>\u041f\u0440\u0438\u0432\u0435\u0442, \u0445\u0430\u0431\u0440\u0430\u044e\u0437\u0435\u0440. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u0435\u0439\u043a\u0443 \u043e \u0441\u0432\u043e\u0435\u043c \u0432\u0438\u0434\u0435\u043d\u0438\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/180751\/\">\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430<\/a>, \u043d\u043e \u043e\u043d\u0430 \u043c\u0430\u043b\u043e \u043a\u043e\u0433\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0432\u043e\u043f\u043b\u043e\u0442\u0438\u043b\u0430 \u0438\u0434\u0435\u044e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0430 \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u0440\u043e\u043c\u0435 \u0432\u0435\u0431 \u044f\u0437\u044b\u043a\u043e\u0432 \u044f \u043c\u0430\u043b\u043e \u0447\u0442\u043e \u0437\u043d\u0430\u044e, \u0442\u043e \u0440\u0435\u0448\u0438\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 html5+js+css \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PhoneGap. \u0418 \u043d\u0430\u0447\u0430\u043b \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u043b\u0438 \u043a\u0443\u043a \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0417\u0430 \u0434\u0435\u043d\u044c \u043d\u0435\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u043d\u0433\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Facebook, \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0438 \u0425\u0430\u0431\u0440\u0430 (\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0448\u043b\u0430 \u043d\u0430 \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a API).<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Android SDK (\u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0434 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443), Eclipse \u0438 PhoneGap \u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u043d\u0430\u0434\u043e <a href=\"http:\/\/docs.phonegap.com\/en\/2.7.0\/index.html\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>.<\/p>\n<p>  \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 JS \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u00ab\u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0432\u0430\u0442\u044c\u00bb \u0441\u0441\u044b\u043b\u043a\u0438 \u0438 \u043a\u0443\u043a\u0438.  <\/p>\n<pre><code class=\"javascript\">var url_parser={ \t\tget_args: function (s) { \t\t\tvar tmp=new Array(); \t\t\ts=(s.toString()).split('&'); \t\t\tfor (var i in s) { \t\t\t\ti=s[i].split(&quot;=&quot;); \t\t\t\ttmp[(i[0])]=i[1]; \t\t\t} \t\t\treturn tmp; \t\t}, \t\tget_args_cookie: function (s) { \t\t\tvar tmp=new Array(); \t\t\ts=(s.toString()).split('; '); \t\t\tfor (var i in s) { \t\t\t\ti=s[i].split(&quot;=&quot;); \t\t\t\ttmp[(i[0])]=i[1]; \t\t\t} \t\t\treturn tmp;\t\t \t\t} };<\/code><\/pre>\n<p>  \u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u043a\u0443\u043a (\u0432\u0434\u0440\u0443\u0433 \u0447\u0435\u0433\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f), \u0445\u043e\u0442\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0432 \u043d\u0438\u0445 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b. get_args \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0438\u0434\u0430 param1=hello&amp;param2=world, \u0430 get_args_cookie \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u043e\u0442\u0434\u0430\u0435\u0442 document.cookie, \u0442.\u0435. \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0438\u0434\u0430 param1=hi; param2=habr. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0432\u0438\u0434\u0430 \u043a\u043b\u044e\u0447=&gt;\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0438 Facebook<\/h4>\n<p>  \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0438 Facebook \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e URL \u0432\u0438\u0434\u0430 (\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f)  <\/p>\n<blockquote><p><code>https:\/\/oauth.vk.com\/authorize?client_id=ID_\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u0438\u044f&scope=\u043f\u0440\u0430\u0432\u0430_\u0434\u043e\u0441\u0442\u0443\u043f\u0430&redirect_uri=http:\/\/oauth.vk.com\/blank.html&display=touch&response_type=token<\/code><\/p><\/blockquote>\n<p>  <\/p>\n<blockquote><p><code>https:\/\/www.facebook.com\/dialog\/oauth?client_id=ID_\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f&scope=\u043f\u0440\u0430\u0432\u0430_\u0434\u043e\u0441\u0442\u0443\u043f\u0430&redirect_uri=http:\/\/sovgvd.info\/blank.html&response_type=token<\/code><\/p><\/blockquote>\n<p>  \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442, \u0432 \u043e\u0442\u043b\u0438\u0447\u0430\u0435 \u043e\u0442 Facebook \u0434\u043b\u044f JS \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043b\u044f facebook \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443 \u043d\u0430 \u0434\u0430\u0432\u043d\u043e \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u043c \u043b\u0438\u0447\u043d\u043e\u043c \u0431\u043b\u043e\u0433\u0435 (\u0445\u043e\u0442\u044f \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0438 \u0432\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f).<br \/>  \u041e\u0442\u0432\u0435\u0442\u044b \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u0445\u043e\u0436\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u044f\u043a\u043e\u0440\u044f (#) \u0438\u043c\u0435\u044e\u0442 \u0432\u0438\u0434:  <\/p>\n<blockquote><p><code>access_token=\u0442\u043e\u043a\u0435\u043d&expires_in=\u0432\u0440\u0435\u043c\u044f_\u0436\u0438\u0437\u043d\u0438_\u0442\u043e\u043a\u0435\u043d\u0430<\/code><\/p><\/blockquote>\n<p>  \u0410 \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0449\u0435 <code>&user_id=ID_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/code>.<\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u0435\u043a \u044d\u0442\u0438\u0445 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <a href=\"http:\/\/docs.phonegap.com\/en\/2.7.0\/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser\">InAppBrowser<\/a>, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0435\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432\u043d\u0442\u0443\u0440\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0447\u0442\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c JS \u0438\u043b\u0438 CSS, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<p>  \u0417\u043d\u0430\u044f \u0432\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c 2 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Vkontakte<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">var plugin_vk = { \twwwref: false, \tplugin_perms: &quot;friends,wall,photos,messages,wall,offline,notes&quot;, \t \tauth: function (force) { \t\tif (!window.localStorage.getItem(&quot;plugin_vk_token&quot;) || force || window.localStorage.getItem(&quot;plugin_vk_perms&quot;)!=plugin_vk.plugin_perms) { \t\t\tvar authURL=&quot;https:\/\/oauth.vk.com\/authorize?client_id=12345&scope=&quot;+this.plugin_perms+&quot;&redirect_uri=http:\/\/oauth.vk.com\/blank.html&display=touch&response_type=token&quot;; \t\t\tthis.wwwref = window.open(encodeURI(authURL), '_blank', 'location=no'); \t\t\tthis.wwwref.addEventListener('loadstop', this.auth_event_url); \t\t} \t}, \tauth_event_url: function (event) { \t\tvar tmp=(event.url).split(&quot;#&quot;); \t\tif (tmp[0]=='https:\/\/oauth.vk.com\/blank.html' || tmp[0]=='http:\/\/oauth.vk.com\/blank.html') { \t\t\tplugin_vk.wwwref.close(); \t\t\tvar tmp=url_parser.get_args(tmp[1]); \t\t\twindow.localStorage.setItem(&quot;plugin_vk_token&quot;, tmp['access_token']); \t\t\twindow.localStorage.setItem(&quot;plugin_vk_user_id&quot;, tmp['user_id']); \t\t\twindow.localStorage.setItem(&quot;plugin_fb_exp&quot;, tmp['expires_in']); \t\t\twindow.localStorage.setItem(&quot;plugin_vk_perms&quot;, plugin_vk.plugin_perms); \t\t} \t} };<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Facebook<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">var plugin_fb = { \twwwref: false, \tplugin_perms: &quot;read_stream,manage_friendlists,read_friendlists,read_mailbox,publish_actions,offline_access&quot;, \t \tauth: function (force) { \t\tif (!window.localStorage.getItem(&quot;plugin_fb_token&quot;) || force || window.localStorage.getItem(&quot;plugin_fb_perms&quot;)!=plugin_fb.plugin_perms) { \t\t\tvar authURL=&quot;https:\/\/www.facebook.com\/dialog\/oauth?client_id=123456&scope=&quot;+this.plugin_perms+&quot;&redirect_uri=http:\/\/sovgvd.info\/blank.html&response_type=token&quot;; \t\t\tthis.wwwref = window.open(encodeURI(authURL), '_blank', 'location=no'); \t\t\tthis.wwwref.addEventListener('loadstop', this.auth_event_url); \t\t} \t}, \tauth_event_url: function (event) { \t\tvar tmp=(event.url).split(&quot;#&quot;); \t\tif (tmp[0]=='https:\/\/sovgvd.info\/blank.html' || tmp[0]=='http:\/\/sovgvd.info\/blank.html') { \t\t\tplugin_fb.wwwref.close(); \t\t\tvar tmp=url_parser.get_args(tmp[1]); \t\t\twindow.localStorage.setItem(&quot;plugin_fb_token&quot;, tmp['access_token']); \t\t\twindow.localStorage.setItem(&quot;plugin_fb_exp&quot;, tmp['expires_in']); \t\t\twindow.localStorage.setItem(&quot;plugin_fb_perms&quot;, plugin_fb.plugin_perms); \t\t}  \t} };<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0442\u0435\u043b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e JavaScript \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c plugin_vk.auth(false); \u0438\u043b\u0438 plugin_fb.auth(false);. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f (plugin_vk.auth(true); \u0438\u043b\u0438 plugin_fb.auth(true);), \u0442\u043e \u043f\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u043a\u043d\u043e \u043b\u043e\u0433\u0438\u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\u0425\u043e\u0442\u044f \u044f \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043d\u043e \u043d\u0438\u0433\u0434\u0435 \u0435\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, \u0430 \u043e\u043d\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \ud83d\ude09<\/div>\n<\/div>\n<h4>Habrahabr<\/h4>\n<p>  \u041b\u044e\u0431\u0438\u043c\u044b\u0439 \u043d\u0430\u043c\u0438 \u0445\u0430\u0431\u0440 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 API \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (\u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u043b\u043e\u0432\u0438\u0442\u044c \u043a\u0443\u043a\u0438, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c InAppBrowser \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e JavaScript \u043a\u043e\u0434\u0430 \u2014 <a href=\"http:\/\/docs.phonegap.com\/en\/2.7.0\/cordova_inappbrowser_inappbrowser.md.html#executeScript\">executeScript<\/a>. \u0412\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u0438 \u0446\u0435\u043b\u044b\u0439 JS \u0444\u0430\u0439\u043b \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 callback \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u044b (\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441 return). \u0422.\u0435. \u043a\u043e\u0434 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u0443\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"javascript\">        plugin_habr.wwwref.executeScript({             code: &quot;document.cookie;&quot;         }, function(arg) {         \tplugin_habr.auth_event_url(arg);         });<\/code><\/pre>\n<p>  \u0410 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0425\u0430\u0431\u0440\u0430 \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Habrahabr<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">var plugin_habr = { \twwwref: false,  \tauth: function (force) { \t\tif (!window.localStorage.getItem(&quot;plugin_habr_PHPSESSID&quot;) || force) { \t\t\tvar authURL=&quot;http:\/\/habrahabr.ru\/login\/&quot;; \t\t\tthis.wwwref = window.open(encodeURI(authURL), '_blank', 'location=yes'); \t\t\tthis.wwwref.addEventListener('loadstop', this.auth_jsinjection); \t\t} \t}, \tauth_event_url: function (url) { \t\tvar tmp=url_parser.get_args_cookie(url); \t\tif (tmp['PHPSESSID'] && tmp['hsec_id']) { \t\t\tplugin_habr.wwwref.close(); \t\t\twindow.localStorage.setItem(&quot;plugin_habra_PHPSESSID&quot;, tmp['PHPSESSID']); \t\t\twindow.localStorage.setItem(&quot;plugin_habra_hsec_id&quot;, tmp['hsec_id']); \t\t} \t}, \tauth_jsinjection: function () { \t\tplugin_habr.wwwref.executeScript({             code: &quot;document.cookie;&quot;         }, function(arg) {         \tplugin_habr.auth_event_url(arg);         }); \t} }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0412\u044b\u0437\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0448\u043b\u044b\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c plugin_habr.auth(false);<\/p>\n<p>  \u041d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d \u0447\u0442\u043e \u043a\u043e\u043c\u0443 \u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u043d\u043e \u0432\u0434\u0440\u0443\u0433. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043d\u0435 \u0444\u0430\u043a\u0442 \u0447\u0442\u043e \u0434\u043e\u0432\u0435\u0434\u0443 \u0434\u043e \u0443\u043c\u0430 \u0441\u0432\u043e\u044e \u0438\u0434\u0435\u044e, \u0430 \u0442\u0435\u0440\u044f\u0442\u044c \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0436\u0430\u043b\u043a\u043e.    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/181007\/\"> http:\/\/habrahabr.ru\/post\/181007\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/phonegap.com\/uploads\/artwork\/Build-Bot-Preview.png\" alt=\"PhoneGap\" align=\"left\"\/>\u041f\u0440\u0438\u0432\u0435\u0442, \u0445\u0430\u0431\u0440\u0430\u044e\u0437\u0435\u0440. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u0435\u0439\u043a\u0443 \u043e \u0441\u0432\u043e\u0435\u043c \u0432\u0438\u0434\u0435\u043d\u0438\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/180751\/\">\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430<\/a>, \u043d\u043e \u043e\u043d\u0430 \u043c\u0430\u043b\u043e \u043a\u043e\u0433\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0432\u043e\u043f\u043b\u043e\u0442\u0438\u043b\u0430 \u0438\u0434\u0435\u044e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0430 \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u0440\u043e\u043c\u0435 \u0432\u0435\u0431 \u044f\u0437\u044b\u043a\u043e\u0432 \u044f \u043c\u0430\u043b\u043e \u0447\u0442\u043e \u0437\u043d\u0430\u044e, \u0442\u043e \u0440\u0435\u0448\u0438\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 html5+js+css \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PhoneGap. \u0418 \u043d\u0430\u0447\u0430\u043b \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u043b\u0438 \u043a\u0443\u043a \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0417\u0430 \u0434\u0435\u043d\u044c \u043d\u0435\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u043d\u0433\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Facebook, \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0438 \u0425\u0430\u0431\u0440\u0430 (\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0448\u043b\u0430 \u043d\u0430 \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a API).  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-181007","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/181007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=181007"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/181007\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=181007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=181007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=181007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}