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

OAuth is not a constructor #170

Open
abraao31 opened this issue Dec 11, 2024 · 1 comment
Open

OAuth is not a constructor #170

abraao31 opened this issue Dec 11, 2024 · 1 comment

Comments

@abraao31
Copy link

abraao31 commented Dec 11, 2024

I followed the README, and my react-app returns me an error saying "OAuth is not a constructor":

code bellow
FlickrService.js:

import FlickrConfig from "configs/FlickrConfig";
import { createFlickr } from "flickr-sdk";

const { upload } = createFlickr(FlickrConfig);

const FlickrService = {};

FlickrService.post = async (file) => {
    return upload(file, {
        title: "Works on MY machine!",
    });
};

export default FlickrService;

FlickrConfig.js:

const FlickrConfig = {
    consumerKey: "xxxxxxxxxxxxxx",
    consumerSecret: "xxxxxxxx",
    oauthToken: "xxxxxxxxxx",
    oauthTokenSecret: "xxxxxxxxxxxxxx"
  
export default FlickrConfig;
@abraao31
Copy link
Author

Ok, i found the error, somehow the classes are interfering each other, im usind ant-design on my project, and it have a class with same name declared with "var" i dont know if it change on the problem or not.

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

1 participant