Вход Регистрация
Файл: plugins/contact_importer/static/js/facebook.js
Строк: 56
<?php
var CI_Facebook = function(libUrluserIdurlForInvite)
{
    var 
self this;

        
this.init = function(params)
        {
            $(
'body').prepend('<div id="fb-root"></div>');

            
window.fbAsyncInit = function() {
                
FB.init(params);
            };

            (function() {
                var 
document.createElement('script');
                
e.src libUrl;
                
e.async true;
                
document.getElementById('fb-root').appendChild(e);
            }());
        }

        
this.requireLogin = function(func)
        {
            
FB.getLoginStatus(function(response)
            {
                if (
response.authResponse)
                {
                    
func(response);
                }
                else
                {
                    
FB.login(function(r)
                    {
                        if (
r.authResponse)
                        {
                            
func(r);
                        }
                    });
                }
            });
        };

    
this.request = function()
        {
            
this.requireLogin(function(r){
                
FB.ui({
                    
method'send',
                    
linkurlForInvite
                
                
}, function(res){
                    if ( 
res.to && res.to.length )
                    {
                        
PEEP.info(PEEP.getLanguageText('contactimporter''facebook_after_invite_feedback', {
                            
countres.to.length
                        
}));
                    }
        });
            });
    };
};
?>
Онлайн: 3
Реклама