https://pinterest-ota-builds.s3.amazona ... itdemo.zip
http://develterners.pinterest.com/ios/i ... /p./pinsth. Eine Datei ist verfügbar < /p>
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
< /code>
Es gibt keine Art von Methode für Anmeldung und Authentifizierung, keine Art von Methode für die Videofreigabe. URL. < /p>
- (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/ ... scription=%@\"", protectedUrl, description];
NSMutableString *htmlString = [[NSMutableString alloc] initWithCapacity:1000];
[htmlString appendFormat:@" "];
[htmlString appendFormat:@"
", buttonUrl];
[htmlString appendFormat:@"
", imageUrl];
[htmlString appendFormat:@""];
[htmlString appendFormat:@" "];
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];
}
< /code>
Bitte helfen Sie mir, Video auf Pinterest zu teilen < /p>