Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Logging In #24

Open
dcatanoso opened this issue Mar 16, 2016 · 8 comments
Open

Issue Logging In #24

dcatanoso opened this issue Mar 16, 2016 · 8 comments

Comments

@dcatanoso
Copy link

Can you provide an updated example using v1.3.0 and oAuth - I've tried using the login example on the documentation tab but it shows logging in with User Name and Password however the login method only accepts a request token. The following code results in an error ({"Object reference not set to an instance of an object."}) when executing the mySite.GetAccessToken method:

            SmugMugModel.Site mySite = new SmugMugModel.Site("key", "secret");

            SmugMugModel.Token RequestToken = mySite.GetRequestToken();
            SmugMugModel.Token AccessToken = mySite.GetAccessToken(RequestToken);
@AlexGhiondea
Copy link
Owner

@AlexGhiondea
Copy link
Owner

And if you are not using the v2 of the API, here is how to do it:

https://github.com/AlexGhiondea/SmugMug.NET/blob/master/src/SmugMugTest/Program.cs

@dcatanoso
Copy link
Author

I will try later tonight...

From: AlexGhiondea [mailto:[email protected]]
Sent: Thursday, March 17, 2016 4:13 PM
To: AlexGhiondea/SmugMug.NET [email protected]
Cc: dcatanoso [email protected]
Subject: Re: [SmugMug.NET] Issue Logging In (#24)

Can you give the code in here a try?

https://github.com/AlexGhiondea/SmugMug.NET/blob/master/src/SmugMugTest.v2/Program.cs


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #24 (comment) https://github.com/notifications/beacon/AP40HplgWK8K11eu-quaGFbgA1mza_YAks5pubXMgaJpZM4Hxq3L.gif

@dcatanoso
Copy link
Author

Where is the SmugMugSecretsAccess class found? The VS is not finding the reference. I can create my own version but if it already exists I'd prefer to use that.

By commenting calls to that out temporarily I am able to get it to work - thanks.

From: AlexGhiondea [mailto:[email protected]]
Sent: Thursday, March 17, 2016 4:26 PM
To: AlexGhiondea/SmugMug.NET [email protected]
Cc: dcatanoso [email protected]
Subject: Re: [SmugMug.NET] Issue Logging In (#24)

And if you are not using the v2 of the API, here is how to do it:

https://github.com/AlexGhiondea/SmugMug.NET/blob/master/src/SmugMugTest/Program.cs


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #24 (comment) https://github.com/notifications/beacon/AP40HjT9SmXMb2kdDANaJQyubRGq9T_3ks5pubjdgaJpZM4Hxq3L.gif

@dcatanoso
Copy link
Author

In the TestImage method what is the purpose of the try catch with the cancellation inside prior to the actual upload?

From: AlexGhiondea [mailto:[email protected]]
Sent: Thursday, March 17, 2016 4:26 PM
To: AlexGhiondea/SmugMug.NET [email protected]
Cc: dcatanoso [email protected]
Subject: Re: [SmugMug.NET] Issue Logging In (#24)

And if you are not using the v2 of the API, here is how to do it:

https://github.com/AlexGhiondea/SmugMug.NET/blob/master/src/SmugMugTest/Program.cs


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #24 (comment) https://github.com/notifications/beacon/AP40HjT9SmXMb2kdDANaJQyubRGq9T_3ks5pubjdgaJpZM4Hxq3L.gif

@AlexGhiondea
Copy link
Owner

@dcatanoso I think the TestImage also tests that you can cancel an upload.

Here is the class that stores the credentials in an encrypted fashion: https://github.com/AlexGhiondea/SmugMug.NET/blob/9f55b2f3f9456b366a3e1701629f4be3490a1ddb/src/SmugMugTest/SmugMugSecretsAccess.cs

@dcatanoso
Copy link
Author

Alex,

That worked I am able to upload photo and video.

Some additional questions.

All the albums I'm creating are ending up in the "Other" folder. Can you provide a sample of navigating to a specific existing folder and then creating a folder in that location?

Also what is the best method to obtain the "return" URL for the created album and for each image / video. I need this pass on to another application so it can browse directly to the image.

From: AlexGhiondea [mailto:[email protected]]
Sent: Friday, March 18, 2016 12:59 PM
To: AlexGhiondea/SmugMug.NET [email protected]
Cc: dcatanoso [email protected]
Subject: Re: [SmugMug.NET] Issue Logging In (#24)

@dcatanoso https://github.com/dcatanoso I think the TestImage also tests that you can cancel an upload.

Here is the class that stores the credentials in an encrypted fashion: https://github.com/AlexGhiondea/SmugMug.NET/blob/9f55b2f3f9456b366a3e1701629f4be3490a1ddb/src/SmugMugTest/SmugMugSecretsAccess.cs


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #24 (comment) https://github.com/notifications/beacon/AP40HnBUC45_ClUmKNfd5FC3ZkUJwTLpks5putnRgaJpZM4Hxq3L.gif

@AlexGhiondea
Copy link
Owner

Questions:

  • All the albums I'm creating are ending up in the "Other" folder. Can you provide a sample of navigating to a specific existing folder and then creating a folder in that location?
    • I think the way to do this is to get a handle to the folder where you want to create the album and then use the methods on that folder to create a new Album
  • Also what is the best method to obtain the "return" URL for the created album and for each image / video. I need this pass on to another application so it can browse directly to the image.
    • I am not sure how to do this... Maybe retrieve the properties for the newly created album?

If this does not work, let me know and I will dig into this a bit more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants