काम नहीं कर रहा है मेरे जीवन के लिए मुझे Event.subscribe ('auth.authResponseChange') काम करने के लिए नहीं मिल सकता है। नीचेफेसबुक FB.Event.subscribe ('auth.authResponseChange')
<div id="fb-root">
</div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: 'XXXXXXXXXXXXXXX', // App ID
channelUrl: 'http://XXXXXXXX.us/', // Channel File
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true // parse XFBML
});
FB.Event.subscribe('auth.authResponseChange', function (response) {
alert('The status of the session is: ' + response.status);
});
};
// Load the SDK Asynchronously
(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));
</script>
<div class="fb-login-button" data-size="xlarge" scope="email" data-show-faces="false"
data-width="400" data-max-rows="1" autologoutlink="true">
Login with Facebook</div>
लॉगिन बटन प्रस्तुत करता है। और मैं भी लॉगआउट कर सकता हूं। केवल समस्या यह है कि auth.response परिवर्तन फायरिंग नहीं है और मुझे "संदेश" पॉपअप नहीं मिल रहा है
FBML शीघ्र ही हटा दिया जाएगा। बेहतर इसका इस्तेमाल नहीं। – InspiredJW
@InspiredJW FBML पहले से ही बहिष्कृत है, यह एक्सएफबीएमएल है, जो कुछ को बहिष्कृत नहीं किया जा रहा है। –
क्या आपने दस्तावेज के अनुसार केवल 'प्रतिक्रिया [0] 'जांचने की कोशिश की है, * ध्यान दें कि कुछ मामलों के लिए, प्रतिक्रिया का मूल्य बेकार है, लेकिन जब एक से अधिक चर वापस आते हैं, इसमें उचित कुंजी होती है। * => http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/ – PlantTheIdea