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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
// Override point for customization after application launch. | |
{ | |
NSString *S3AccessKey = @""; | |
NSString *S3SecretKey = @""; | |
// Initialize based on static credential provider | |
AWSStaticCredentialsProvider *credentialsProvider = [[AWSStaticCredentialsProvider alloc] initWithAccessKey:S3AccessKey secretKey:S3SecretKey]; |
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
public void shareImageToTwitter() { | |
TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient(); | |
File photo = new File(localImagePath); | |
TypedFile typedFile = new TypedFile("application/octet-stream", photo); | |
MediaService ms = twitterApiClient.getMediaService(); | |
ms.upload(typedFile, null, null, new Callback<Media>() { | |
@Override | |
public void success(Result<Media> mediaResult) { |