2013-06-25 1 views
1

나는 비디오를 Pinterest에서 공유하고 싶은 응용 프로그램을 개발 중입니다. 나는 그래서 이미지share video on Pinterest

https://pinterest-ota-builds.s3.amazonaws.com/PinItDemo.zip

http://developers.pinterest.com/ios/

에 대한 발견에 검색하고 난 프레임 워크에서, 프레임 워크를 다운로드하여 하나의 파일 만 사용할 수 있습니다

방법에는 어떤 유형이 없습니다
Pinterest.h 

@interface Pinterest : NSObject 

- (id)initWithClientId:(NSString *)clientId; 

- (id)initWithClientId:(NSString *)clientId 
    urlSchemeSuffix:(NSString *)suffix; 

- (BOOL)canPinWithSDK; 

- (void)createPinWithImageURL:(NSURL *)imageURL 
       sourceURL:(NSURL *)sourceURL 
       description:(NSString *)descriptionText; 

+ (UIButton *)pinItButton; 

@end 

로그인 및 인증 용으로, 비디오 공유를위한 모든 유형의 메소드가 없습니다.

나는 또한이 UIWebView을 사용하고 사용 iOS Pin It SDK with no documentation and sample code

이가없는 비디오 또는 URL없이 이미지 URL에서 잘 작동 찾을 수 있습니다.

- (NSString*) generatePinterestHTML { 
    NSString *description = @"Post your description here"; 

    NSString *sUrl = [NSString stringWithFormat:@"http://www.alkalima.com/images/08-02/nature.jpg"]; 
    NSLog(@"URL:%@", sUrl); 
    NSString *protectedUrl = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL,(CFStringRef)sUrl, NULL, (CFStringRef)@"!*'\"();:@&=+$,/?%#[]% ",CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding)); 
    NSLog(@"Protected URL:%@", protectedUrl); 
    NSString *imageUrl = [NSString stringWithFormat:@"\"%@\"", sUrl]; 
    NSString *buttonUrl = [NSString stringWithFormat:@"\"http://pinterest.com/pin/create/button/?url=www.flor.com&media=%@&description=%@\"", protectedUrl, description]; 

    NSMutableString *htmlString = [[NSMutableString alloc] initWithCapacity:1000]; 
    [htmlString appendFormat:@"<html> <body>"]; 
    [htmlString appendFormat:@"<p align=\"center\"><a href=%@ class=\"pin-it-button\" count-layout=\"horizontal\"><img border=\"0\" src=\"http://assets.pinterest.com/images/PinExt.png\" title=\"Pin It\" /></a></p>", buttonUrl]; 
    [htmlString appendFormat:@"<p align=\"center\"><img width=\"400px\" height = \"400px\" src=%@></img></p>", imageUrl]; 
    [htmlString appendFormat:@"<script type=\"text/javascript\" src=\"//assets.pinterest.com/js/pinit.js\"></script>"]; 
    [htmlString appendFormat:@"</body> </html>"]; 
    return htmlString; 
} 

- (void) postToPinterest { 
    NSString *htmlString = [self generatePinterestHTML]; 
    NSLog(@"Generated HTML String:%@", htmlString); 
    webViewPinterest.backgroundColor = [UIColor clearColor]; 
    webViewPinterest.opaque = NO; 
    if ([webViewPinterest isHidden]) { 
     [webViewPinterest setHidden:NO]; 
    } 
    [webViewPinterest loadHTMLString:htmlString baseURL:nil]; 
} 

지금 당신은 그들이 SDK와 함께 사진 만 아니라 비디오를 공유 할 수 있다는 것 대표자

답변

2

에 비디오 공유를위한 저를 도와주세요. http://developers.pinterest.com/ios/에서

은 : 지금

, 우리는 URL에서 이미지를 고정 지원합니다. 앞으로 로컬 이미지 고정에 대한 지원을 추가 할 예정입니다.