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">
.fb-login
{
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;
}
</style>
<div id="fb-root"></div>
<script>
function share_prompt() {
FB.init({
appId : '1********',
status : true,
cookie : true,
xfbml : true,
oauth : true,
});
FB.ui({
method: 'feed',
name: 'Facebook Dialogs',
redirect_uri:'http://sp2010sw140:20004/_trust/default.aspx?trust=Facebook&ReturnUrl=%2f_layouts%2fAuthenticate.aspx%3fSource%3d%252FSitePages%252FHome%252Easpx&Source=%2FSitePages%2FHome.aspx',
message: ''
});
(function(d){
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);
}(document));
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});
});
}
</script>
Thanks in advance