2011-05-11 54 views
2

我從未收到過簽名請求請求變量。「註冊」窗口小部件未收到簽名請求

在它的最簡單的,應該不是這個回報signed_request:

<div id="fb-root"></div> 
<script src="http://connect.facebook.net/en_US/all.js#appId=########&xfbml=1"></script> 

<fb:registration 
    fields="name,birthday,gender,location,email" 
    redirect-uri="http://mydomain.com/index.php" 
    width="530"> 
</fb:registration> 


<? 
var_dump($_REQUEST); //shouldn't the signed_request variable be in here somewhere, there is nothing 
?> 
+0

我想這應該!檢查你的FB應用程序設置...也檢查這[教程](http://www.masteringapi.com/tutorials/how-to-use-facebook-registration-plugin-as-your-registration-system/15/) – ifaour 2011-05-12 08:23:13

+0

該鏈接幫助,但我仍然努力找出爲什麼重定向uri沒有任何signed_request $ _REQUEST在帖子中。如果我想出任何東西,我會更新。多謝你們! – 2011-05-14 00:35:51

回答

0

嘗試是這樣的:

<script type="text/javascript"> 
//<![CDATA[ 
(function() { 
    var e = document.createElement('script'); 
    e.type = 'text/javascript'; 
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; 
    e.async = true; 
    document.getElementById('fb-root').appendChild(e); 
}()); 

window.fbAsyncInit = function() 
{ 
    FB.init({appId: '%YOUR_APP_ID%', status: true, cookie: true, xfbml: true}); 
} 
//]]> 
</script> 
<fb:registration 
    class="fb_iframe_widget" 
    width="500" 
    client_id="%YOUR_APP_ID%" 
    fb_only="true" 
    fields="name,email,birthday,gender" 
    redirect-uri="%YOUR_REDIRECT_URL%" 
> 
</fb:registration> 

你會看到在%YOUR_REDIRECT_URL%簽名的請求