开发者

Resume FB Connect session

i am using FB Connect on my site and i am able get & store offline access session key in DB.

My question, i need to display the multiple friend selector form even if there is no FB connect session.

How can i force it to resume/create the session i have in DB, so i can display friends in the below form.

Since i already got extended permissions, I must not ask them for login again. please help

require_once 'config.php';  

$user = "1294712371";
$session = "827466297c301f2cc6b581ce-1294712371";开发者_如何学Python

?>
<fb:serverfbml style="align:center;">
    <script type="text/fbml">
        <fb:fbml>
            <fb:request-form 
              action="test.php" 
              method="POST" 
              invite="true" 
              type="dot.com" 
              content="Come and join me"
              <fb:req-choice url='see wiki page for fb:req-choice for details'
              label='Join Me' />
              <fb:multi-friend-selector showborder="false"
              actiontext="Invite your friends">
            </fb:request-form>
        </fb:fbml>
    </script>
</fb:serverfbml>

<script src="JS/FeatureLoader.js" type="text/javascript"></script>
<script type="text/javascript">
FB_RequireFeatures(["XFBML"], function()
{
    FB.init('appapikey', "xd_receiver.htm");
});
</script>

Currently the above code shows no friends at all when there is no FB connect loggedin sesstion


You could use set_user method from the php client library

$facebook = new Facebook(API_KEY, API_SECRET);
$facebook->set_user($user, $session);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜