Closed hiren443 closed 12 years ago
i'll add an example asap however just:
I have done your step but nothing working I am eagerly waiting for your example
I have create demo for instagram using your sdk
instagram = [[Instagram alloc] initWithClientId:@"052252e29cdb409bb985dce423b4ca4a" delegate:self];
[instagram authorize:nil];
Now I get the error like Cannot Open Page Safari cannot open the page because the address is invalid
when i track i get the Url https://instagram.com/oauth/authorize?response_type=token&redirect_uri=ig052252e29cdb409bb985dce423b4ca4a%3A%2F%2Fauthorize&client_id=052252e29cdb409bb985dce423b4ca4a
i have set redirect url path in instagram as ig052252e29cdb409bb985dce423b4ca4a://authorize and also add URL schema in xcode ig052252e29cdb409bb985dce423b4ca4a://authorize
You probably forget to handle the schema in your application delegate ;) I've added an example and updated the readme file.
Hello Crino Thanx for example One more issue. can we post image on instagram using your sdk?
No, Instagram doesn't expose any API for publish photos. You need to use 'iPhone hooks' (http://instagram.com/developer/iphone-hooks/)
Hello Crinco I have downloaded the instagram sample nad using that, i am able to login and logout, but when i am trying to relogin than its taking the old Credentials its not asking for the New Credentials, Can u Please help me out , I am struck with problem for a Long time
Hello Crinco i have downloaded a sample and used it but while connecting it is showing message unauthorized and when i debug it i get message on log that i am getting the url is null.
when i hit the url on browser it redirects me to my redirect url please help
Nitin Gupta
Did you change something? I just tried the example and works
Hi Crino, I stuck in very strange problem. I am constantly getting error "Redirect URI does not match registered redirect URI". I have set Redirect URI as : "https://igfdabfbdacdd14f908a456195445a7e38://authorize"
Set URL Schema in .plist file as : "igfdabfbdacdd14f908a456195445a7e38://authorize"
And when i try to login i get URL like : "https://instagram.com/oauth/authorize?response_type=token&redirect_uri=igfdabfbdacdd14f908a456195445a7e38%3A%2F%2Fauthorize&scope=comments+likes&client_id=fdabfbdacdd14f908a456195445a7e38"
Can you help me out what i am doing wrong?
Any help is appreciated.
Thank you.
Remove ://authorize from schema in plist ;)
Thanks for the prompt response. I have removed it but still the error is same.
My application info is something like this:
WEBSITE URL : https://igfdabfbdacdd14f908a456195445a7e38://authorize REDIRECT URI: https://igfdabfbdacdd14f908a456195445a7e38://authorize
Try with http
Hi,
By unchecking "Enforce signed header" and removing "https://" from the redirect URL have solve my problem. But now i am not able to call delegate methods of the IGSessionDelegate.
Hi, I'm trying to create an application where it opens instagram after editing the picture in my app. I wanted it to include a hashtag on the description when it goes to instagram but I seem to get lost on how to implement that. The iphone hooks states to use the tag line but I don't know where to place that. below is my code appreciate any help. Thank you.
NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"]; if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
docInteraction.delegate = self;
//Saves the edited Image to directory
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@"instaFilterx.jpg"];
UIImage *image = combinedImage;
NSData *imageData = UIImagePNGRepresentation(image);
[imageData writeToFile:savedImagePath atomically:NO];
//Loads the edited Image
NSString *getImagePath = [documentsDirectory stringByAppendingPathComponent:@"instaFilterx.jpg"];
UIImage *tempImage = [UIImage imageWithContentsOfFile:getImagePath];
//Hooks the edited Image with Instagram
NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/instaFilterx.igo"];
[UIImageJPEGRepresentation(tempImage, 1.0) writeToFile:jpgPath atomically:YES];
// Prepares the DocumentInteraction with the .igo image for Instagram
NSURL *instagramImageURL = [[NSURL alloc] initFileURLWithPath:jpgPath];
docInteraction = [UIDocumentInteractionController interactionControllerWithURL:instagramImageURL];
[docInteraction setUTI:@"com.instagram.exclusivegram"];
hello can you give some note to how it's implemented in app