チャットドキュメントによると:
// creates the response array
$resp_array = array(
'method' => $challenge_array['method'],
'nonce' => $challenge_array['nonce'],
'access_token' => $access_token,
'api_key' => $options['app_id'],
'call_id' => 0,
'v' => '1.0',
);
// creates signature
$response = http_build_query($resp_array);
そこで、以下のコードを変更します。
[buffer appendFormat:@"api_key=%@&", self.app_key];
[buffer appendFormat:@"call_id=%d&", rand()];
[buffer appendFormat:@"method=%@&", self.method];
[buffer appendFormat:@"nonce=%@&", self.nonce];
[buffer appendFormat:@"access_token=%@&",self.accessToken];
[buffer appendFormat:@"v=%@&",@"1.0"];
NSData *utf8data = [buffer dataUsingEncoding:NSUTF8StringEncoding];
次に[utf8data base64Encoded]
、fbサーバーに送信します
しかし、それでも未認証エラーが発生します。
RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>
明らかに、session_key と sig を accesstoken に置き換えました。
私は何かを省略しましたか?
私はこのトラブルを殺す方法がわかりません。