开发者

iPhone - OARequestHeader warnings

开发者 https://www.devze.com 2023-02-08 22:16 出处:网络
I am trying to upload a picture to TwitPic using GSTwitPicEngine. I have included all the requirements but it seems that some functions used in OARequestHeader class are not recognized. Here is an exa

I am trying to upload a picture to TwitPic using GSTwitPicEngine. I have included all the requirements but it seems that some functions used in OARequestHeader class are not recognized. Here is an example:

[chunks addObject:[NSString stringWithFormat:@"realm=\"%@\"", [realm encodedURLParameterString]]];

The "encodedURLParameterString" function is not recognized. realm variable is a NSString.

Do you h开发者_开发知识库ave any idea what I have done wrong?

Thanks, Andrei


YEP!

You are missing one file or missed to include it (it's part of OAuthConsumer). Simply download

NSString+URLEncoding.h

and

NSString+URLEncoding.m 

from http://oauth.googlecode.com/svn/code/obj-c1/OAuthConsumer/NSString+URLEncoding.h and http://oauth.googlecode.com/svn/code/obj-c1/OAuthConsumer/NSString+URLEncoding.m

and add the #import line into the file, where the error appeared:

#import "NSString+URLEncoding.h"

This will add "encodedURLParameterString" to NSStrings selectors.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号