2016-05-24 4 views
0

Ich benutze die Yelp API für meine mobile Anwendung. Die Yelp-API benötigt eine OAuth2-Anforderung (Consumer-Key, geheimer Schlüssel, Token, geheimes Token). Wie mache ich die Anfrage mit reaktionseigenem?OAuth2 Anfrage mit React Native

Antwort

-1

Sie können mit Netzwerk-Abrufanforderung api machen, siehe http://facebook.github.io/react-native/releases/0.26/docs/tutorial.html#fetching-real-data

siehe https://github.com/github/fetch für Dokumentation

fetch(apiUrl, options) 
    .then(function(response) { 
    return response.json() 
    }).then(function(json) { 
    console.log('parsed json', json) 
    }).catch(function(ex) { 
    console.log('parsing failed', ex) 
    }) 
+0

dies ist nur eine einfache Anfrage holen, wo ist der oauth Teil? – funkysoul