Facebook Login popup not closed after successfull login? RRS feed

  • Question

  • Hi,

    I have implemented Facebook integration with sharepoint. My problem is when i click on Face book login the small window will open. when i pass the valid credential it will redirected to URL which i specified in Connect URL in Facebook application on developer.facebook.com. The main problem is this page is redirected on same page (small login page). not in new page. I want that if user logged in then that login window will be closed and main window will be redirected to url

    is there anything missing in library or in javascript?

    Below code I used:

    <script src="https://connect.facebook.net/en_US/all.js" type="text/javascript" charset="utf-8"></script>

    <fb:login-button class="fb-login" onclick="share_prompt()"></fb:login-button>

    <style type="text/css">

        background: url('http://sstatic.net/ads/img/fb.png?v=5');
        background-position: -107px 0px;
        width: 70px;
        height: 22px;
        float: left;
        top: -1px;
        border: transparent;
        margin-left: 10px;
        margin-top: 19px;

    <div id="fb-root"></div> 


    function share_prompt() {

                appId      : '1********',           
                status     : true,
                cookie     : true,
                xfbml      : true,
                oauth      : true,           

     method: 'feed',         
     name: 'Facebook Dialogs',  
            message: ''


         var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
         if (d.getElementById(id)) {return;}
         js = d.createElement('script'); js.id = id; js.async = true;
         js.src = "//connect.facebook.net/en_US/all.js";
         ref.parentNode.insertBefore(js, ref);

    FB_RequireFeatures(["Api"], function() {
                    FB.Facebook.init('1*******', 'http://sp2010sw140:20004/_trust/default.aspx?trust=Facebook&ReturnUrl=%2f_layouts%2fAuthenticate.aspx%3fSource%3d%252FSitePages%252FHome%252Easpx&Source=%2FSitePages%2FHome.aspx/xd_receiver.htm', {"reloadIfSessionStateChanged":true});                           


    Thanks in advance

    Wednesday, March 28, 2012 12:24 PM


  • Please recheck:

            message: ''

    Have you generated any log file or trace file for this code? Please provide it, if you have?



    Building server side components that can integrate SharePoint and Facebook have some requirements that you must solve before the integration of other components such as web parts can begin.  Some of the major issues that must be solved are where do I store the Application Key/Secret and how can you maintain user authorization per page.


    Friday, March 30, 2012 5:03 AM