0

私の iOS アプリで、video.comment.addcomment を使用して vimeo ビデオにコメントを追加しようとすると、コメントが 1 単語のみの場合は適切に追加されますが、複数の単語の場合は署名が無効であるというエラーが表示されます。私が使用したコードは次のとおりです。

NSString *new = [NSString stringWithString:commentis];
    new = [new stringByReplacingOccurrencesOfString:@" " withString:@"+"];
NSString *url12 = @"http://vimeo.com/api/rest/v2?format=json&method=vimeo.videos.comments.addComment&video_id=123456&comment_text=good";
url12 = [url12 stringByReplacingOccurrencesOfString:@"123456" withString:videoplaying];
url12 = [url12 stringByReplacingOccurrencesOfString:@"good" withString:new];

NSURL *urlinfo = [[NSURL alloc] initWithString:url12];
OAMutableURLRequest *request3 = [[OAMutableURLRequest alloc]initWithURL:urlinfo consumer:consumer token:tokenfi realm:nil signatureProvider:nil];

私はエラーを理解していません.私が得ているjson応答は

{
err =     {
    code = 401;
    expl = "The oauth_signature passed was not valid.";
    msg = "Invalid signature";
};
"generated_in" = "0.0124";
stat = fail;
}

しかし、コメントを1つの単語として指定すると、正常に機能します。

4

1 に答える 1