Skip to main content
Version: v5

Pinterest

Cordova plugin for Pinterest

https://github.com/zyramedia/cordova-plugin-pinterest

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Installation

$ npm install cordova-plugin-pinterest 
$ npm install @awesome-cordova-plugins/pinterest
$ ionic cap sync

Supported Platforms

  • Android
  • iOS

Usage

React

Learn more about using Ionic Native components in React

Angular

import { Pinterest, PinterestUser, PinterestPin, PinterestBoard } from '@awesome-cordova-plugins/pinterest/ngx';

constructor(private pinterest: Pinterest) { }

...

const scopes = [
this.pinterest.SCOPES.READ_PUBLIC,
this.pinterest.SCOPES.WRITE_PUBLIC,
this.pinterest.SCOPES.READ_RELATIONSHIPS,
this.pinterest.SCOPES.WRITE_RELATIONSHIPS
];

this.pinterest.login(scopes)
.then(res => console.log('Logged in!', res))
.catch(err => console.error('Error loggin in', err));

this.pinterest.getMyPins()
.then((pins: PinterestPin[]) => console.log(pins))
.catch(err => console.error(err));

this.pinterest.getMe()
.then((user: PinterestUser) => console.log(user));

this.pinterest.getMyBoards()
.then((boards: PinterestBoard[]) => console.log(boards));