我正在使用 Facebook 查看所有使用此特定应用程序的朋友。现在在我的应用程序中,我可以查看使用相同应用程序的朋友的个人资料图片,但在点击个人资料照片应用程序时,他们将分别重定向到他们的 Facebook 页面。单击时,我想重定向到 Facebook 页面以外的其他链接。可能吗 ?如何 ?
我的代码是
<script>
FB.init({
appId : '********', //App ID
channelUrl : 'http://www.***.in/', // Channel File
status : true,
cookie : true,
xfbml : true
});
FB.getLoginStatus(function(response) {
if (response.session) {
globaluserid=response.session["uid"];
//fetching friends uids from 'friend' table. We are using FB.api syntax
FB.api(
{
method: 'fql.query',
query: 'SELECT uid1 FROM friend WHERE uid2='+globaluserid
},
function(response) {
//once we get the response of above select query we are going to parse them
for(i=0;i<response.length;i++)
{
//fetching name and square profile photo of each friends
FB.api(
{
method: 'fql.query',
query: 'SELECT name,pic_square,username FROM user WHERE uid='+response[i].uid1
},
function(response) {
//creating img tag with src from response and title as friend's name
htmlcontent='<img src='+response[0].pic_square+' title='+response[0].name+' alt='+response[0].username+' />';
}
);
}
}
);
} else {
// no user session available, someone you dont know
top.location.href="../kfb_login.php";
}
});
</script>
<div class="just_trying">
<div class="fb-login-button" data-show-faces="true" data-width="200" data-max-rows="1"> </div> </div>