flickr-sdk
flickr-sdk copied to clipboard
OAuth is not a constructor
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;
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.