2012-01-02 29 views
0

私はautomaticalyこのようなツイッターで '#' 文字を含むURLを公開しようとしています:'#' 文字Twitterの投稿のURL

https://twitter.com/intent/tweet?related=palcomp3&text=Confira!!&url=http://palcomp3.com/avioesdoforro/#!/de-costa-mainha 

しかしツイッターをこれは#

後にすべてのものを無視私が試したコード:

[webView setUrlAddress:[NSString stringWithString:@"https://twitter.com/intent/tweet?related=palcomp3&text=Confira!!&url=http://palcomp3.com/avioesdoforro/#!/de-costa-mainha"]]; 

[webView setUrlAddress:[NSString stringWithString:@"https://twitter.com/intent/tweet?related=palcomp3&text=Confira!!&url=http://palcomp3.com/avioesdoforro/%23!/de-costa-mainha"]]; 

答えて

3

ほとんどおそらくエンコーディング、URLセーフな文字列を取得するためにstringByAddingPercentEscapesUsingEncodingを使用してみてください、とURL

NSString *str=[NSString stringWithString:@""https://twitter.com/intent/tweet?related=palcomp3&text=Confira!!&url=http://palcomp3.com/avioesdoforro/#!/de-costa-mainha"]; 
str=[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 
[webView setUrlAddress:str]; 
としてそれを使用
関連する問題