Created
October 13, 2016 11:57
-
-
Save SongJiaqiang/f92d78e5ea1b831c376f00931b481fd1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the publish permission | |
- (void)getPublishPermission { | |
NSArray* permissions = [[NSArray alloc] initWithObjects: | |
@"publish_stream", nil]; | |
[facebook authorize:permissions delegate:self]; | |
[permissions release]; | |
} | |
- (void)fbDidLogin { | |
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mov"]; | |
NSData *videoData = [NSData dataWithContentsOfFile:filePath]; | |
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: | |
videoData, @"video.mov", | |
@"video/quicktime", @"contentType", | |
@"Video Test Title", @"title", | |
@"Video Test Description", @"description", | |
nil]; | |
[facebook requestWithGraphPath:@"me/videos" | |
andParams:params | |
andHttpMethod:@"POST" | |
andDelegate:self]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment