प्रतिक्रिया मूल के साथ फ़ायरबेस ट्विटर प्रमाणीकरण का उपयोग कैसे करें?प्रतिक्रिया मूल के साथ फायरबेस ट्विटर प्रमाणीकरण का उपयोग कैसे करें?
मैं https://www.firebase.com/docs/web/guide/login/twitter.html
var Firebase = require("firebase");
var App = React.createClass({
render: function() {
return (
<View>
<Text onPress={this._handlePress}>
Twitter login
</Text>
</View>
);
},
_handlePress: function() {
var myApp = new Firebase("https://<myapp>.firebaseio.com");
myApp.authWithOAuthRedirect("twitter", function(error) {
if (error) {
console.log("Login Failed!", error);
} else {
// We'll never get here, as the page will redirect on success.
}
});
}
});
और
var Firebase = require("firebase");
var App = React.createClass({
render: function() {
return (
<View>
<Text onPress={this._handlePress}>
Twitter login
</Text>
</View>
);
},
_handlePress: function() {
var myApp = new Firebase("https://<myapp>.firebaseio.com");
myApp.authWithOAuthPopup("twitter", function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
}
});
जब मैं authWithOAuthRedirect
का उपयोग करने के संदर्भ में नीचे दिए गए कोड के दोनों की कोशिश की, एक त्रुटि
undefined is not an object (evaluating 'window.location.href')
की तरह हुआ जब मैं authWithOAuthPopup
का उपयोग , कुछ नहीं हुआ।
मैं इस प्रश्न को कैसे हल कर सकता हूं? या यह संभव नहीं है?
उस अंतिम बिंदु पर, आईओएस के लिए फायरबेस लॉगिन डेमो शुरू करने के लिए एक अच्छी जगह हो सकती है: https://github.com/firebase/login-demo-ios लेकिन यह नहीं होगा दिल में बेहोश –
आपकी मदद के लिए धन्यवाद। मैंने प्रतिक्रिया मूल का उपयोग करना बंद कर दिया और आयनिक का उपयोग करने की कोशिश की। – okmttdhr
@ फ्रैंकवन पफेलन क्या यह ईमेल/पीडब्ल्यू ऑथ के साथ-साथ फायरबेस के साथ प्रतिक्रियात्मक मूल पर भी सच है? –