लौटता है मैं ट्विटर प्रमाणीकरण पर काम कर रहा हूं, जब तक मैं getAccessToken
पर पहुंचता हूं तब तक सबकुछ ठीक से काम करता है जो Array ([ ] =>)
देता है।ट्विटर OAUTH एक रिक्त सरणी
मैंने क्या किया:
प्रथम चरण:
$connection = new TwitterOAuth('xxxxxxxx','xxxxxxxx'); $temporary_credentials = $connection->getRequestToken('http://example.com/profile.php?passurl=1'); $redirect_url = $connection->getAuthorizeURL($temporary_credentials); $_COOKIE['oauth_token'] = $temporary_credentials['oauth_token']; $_COOKIE['oauth_token_secret'] = $temporary_credentials['oauth_token_secret']; header("Location: $redirect_url");
दूसरे चरण (यह वह जगह है जहाँ मैं समस्या का सामना)
$connection = new TwitterOAuth( 'xxxxxxxxxx', 'xxxxxxxxxx', $_COOKIE['oauth_token'], $_COOKIE['oauth_token_secret'] ); $token_credentials = $connection->getAccessToken();
मैं इरादा $token_credentials
मानों की बचत Array ([ ] =>)
क्या मैं सही नहीं मिल रहा है: डेटाबेस में लेकिन यह एक खाली सरणी देता है?
कृपया अगली बार पोस्ट करने से पहले अपने कोड इंडेंट करने के लिए प्रयास करते हैं, यह पूरी तरह से पढ़ने योग्य नहीं था! – m09
संपादन के लिए धन्यवाद! –
'twitteroauth.php' में' var_dump ($ प्रतिक्रिया) जोड़ें, '' http' फ़ंक्शन के अंत में। यह ट्विटर से लौटा कच्चा जवाब होगा। क्या यह एक त्रुटि है या एक टोकन का उपयोग है? स्ट्रिंग (147) "oauth_token = xxxxstringxxxx और oauth_token_secret = xxxxstringxxxx और oauth_callback_con अंतिम रूप = सच": – abraham