0

I have an app which shows pinterest pins and boards. The Api for developing pinterest are now available on their site. Anyone explain the basic steps to do so. Thanks in advance.

Midhun Sivaraj
  • 493
  • 5
  • 13
  • 1
    "Anyone explain the basic steps to do so". Do so what exactly? All you said was you have an app that has pinterest pins and boards and that the API is available. You never asked a question – i_me_mine Jun 06 '13 at 16:55
  • Sorry for the trouble. I just need the method to integrate pinterest on my app. I don't have any experience in developing web apps. I have made some research over internet and i don't get any results. – Midhun Sivaraj Jun 06 '13 at 17:16

1 Answers1

3

There is a very good explination straight from pinterest here --> pinterest

However for future readers if you want to know whats in there it looks like this.

Using the SDK

Register for a Client ID
Download the documentation and SDK
First place the pinit-sdk.jar folder into YOUR_PROJECT/libs and integrate into your IDE or build system.
Then we need to do a one time setup.

PinItButton.setPartnerId("YOUR_PARTNER_ID"); // required
PinItButton.setDebugMode(true); // optional

To use the PinIt button in an XML layout first add it like so.

<com.pinterest.external.PinItButton
    android:id="@+id/pin_it"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>

Next, find the button and set some properties

PinItButton pinIt = (PinItButton) findViewById(R.id.pin_it);
pinIt.setImageUrl("http://placekitten.com/400/300");
pinIt.setUrl("http://placekitten.com"); // optional
pinIt.setDescription("A place kitten!"); // optional

Alternatively, we can instantiate and add the button entirely in Java.

PinItButton pinIt = new PinItButton(this);
pinIt.setImageUrl("http://placekitten.com/400/300");
pinIt.setUrl("http://placekitten.com");
pinIt.setDescription("A place kitten!");
view.addView(pinIt);

Deep Linking

Since launch, Pinterest for Android supports deep linking of Pins, Users and Boards in two ways. First, when using the standard Android Browser or other native apps, any normal Pinterest link is capable of being opened in our app. The recommended option for developers is to use a Uri scheme as seen below.

Pin

pinterest://pinterest.com/pin/285063851385287883/

Board

pinterest://pinterest.com/meaghanror/cats-cats-cats/

User

pinterest://pinterest.com/carlrice/
i_me_mine
  • 1,435
  • 3
  • 20
  • 42
  • I checked. It only describes the usage of pinIt buttons. I think the developers at pinterest is not supporting external developers to develop their site integrated apps. – Midhun Sivaraj Jun 06 '13 at 17:24
  • @Midhun well what else would you like to do with pinterest? The entire application consists of sticking pins and following topics you are interested in. What exactly do your want you app to do? – i_me_mine Jun 06 '13 at 17:27
  • I want my app to search boards and invite peoples to the board. – Midhun Sivaraj Jun 06 '13 at 17:29
  • From what I've seen I dont think that's possible.. *yet*. There is a lot more information here http://stackoverflow.com/questions/9951045/pinterest-api-documentation – i_me_mine Jun 06 '13 at 17:33
  • Can I use different button image for the pin it button? – Lendl Leyba Apr 29 '14 at 07:09
  • @Lei Leyba: Yes, you can use whatever view you wish (e.g. Button, ImageButton, ImageView) for PinIt functionality. Just call the Pinterest SDK's PinIt button's callOnClick method from your view or custom button. callOnClick method call requires API level 15. – Mudassir Jun 12 '14 at 11:11
  • any jar file for pintrest – Prasad Feb 16 '16 at 12:50