I have developed an iPhone application which can tweet the photos and videos using Twitter iOS SDK. Twitpic is used to upload the photos, Twitvid is used to upload the videos and the uploaded URLs are tweeted using the APIs provided by Twitter.
But currently V1.0 does not support video upload using Twitvid in ios6 (ios5 it works).
So i try integrated twitter api V1.1, i do following changes.
- in MGTwitterEngine.m:
#define TWITTER_DOMAIN @"api.twitter.com/1.1
2.in OAuth.m:
Method: synchronousVerifyTwitterCredentials
NSString *url = @“https://api.twitter.com/1.1/account/verify_credentials.json”;
- in RTTwitterQueryController:
Method: authenticateTwitVid
-(void)authenticateTwitVid
{
OAuth *authorizer = [[OAuth alloc] initWithConsumerKey: CONSUMER_KEY andConsumerSecret: CONSUMER_SECRET];
authorizer.oauth_token = [mTwitterEngine._accessToken key];
authorizer.oauth_token_secret = [mTwitterEngine._accessToken secret];
authorizer.oauth_token_authorized = YES;
NSString *authHeader = [authorizer oAuthHeaderForMethod: @“GET” andUrl: @“http://api.twitter.com/1/account/verify_credentials.xml” andParams: nil];
if([authorizer synchronousVerifyTwitterCredentials]) //it works.
{
NSLog(@“sucess !!!”); //it is printed.
}
else
{
NSLog(@“unsucess !!!”);
}
mTwitVidEngine = [[TwitVid alloc] init];
[mTwitVidEngine setDelegate: self];
mVideoRequest = [[mTwitVidEngine authenticateWithXVerifyCredentialsAuthorization: authHeader xAuthServiceProvider: @"http://api.twitter.com/1/account/verify_credentials.xml"] retain]; //here no callback come(either success or failure).
[authorizer release];
}
so, my problem is (in ios6 , twitter api v1.1),
- i cannot authenticate TwitVid in ios6 (ios5 it works) using v1.1, when i call , mVideoRequest = [[mTwitVidEngine authenticateWithXVerifyCredentialsAuthorization: authHeader xAuthServiceProvider: @“http://api.twitter.com/1/account/verify_credentials.xml”] retain];
No callback came either succes or failure. but synchronousVerifyTwitterCredentials works in above code.
Printing description of authHeader:
OAuth realm="",
oauth_consumer_key=“2pOUeo73wMJ9lKLWM7REQw”,
oauth_nonce=“6bbd2b695bc8f10bb4834d8096e3821b69bacea7”,
oauth_signature=“PV7JaIhzMD6MUfc0Amfg6siL83Y%3D”,
oauth_signature_method=“HMAC-SHA1”,
oauth_timestamp=“1351793545”,
oauth_token=“185175570-tTqY8IuB15qRw49IF7uQCEV8gwVyr8oiuieuFuM9”,
oauth_version=“1.0”
- is there new Twitvid library for ios6?
Thanks and Regards,
Girish.