如何整合Pinterest的我的应用程序? [英] How to integrate pinterest on my app?

查看:191
本文介绍了如何整合Pinterest的我的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,显示Pinterest的引脚和板。开发Pinterest的API的,现在在其网站上提供。任何人解释的基本步骤这样做。先谢谢了。

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.

推荐答案

有一个很好的explination直接来自Pinterest的位置 - >的 Pinterest的

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.

使用SDK

注册一个客户端ID结果
下载文档和SDK结果
第一名的PINIT-sdk.jar文件夹放到YOUR_PROJECT /库和集成到IDE或构建系统。结果
然后,我们需要做的一次性设置。

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

要在XML布局使用PINIT按钮先添加它像这样。

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

另外,我们可以实例,并添加完全用Java的按钮。

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);

深层链接

自推出以来,Pinterest的为Android以两种方式支持销,用户和董事会的深层链接。首先,使用标准的Andr​​oid浏览器或其他本地应用程序的时候,任何正常Pinterest的链接能够在我们的应用程序被打开。对于开发人员推荐的方法是使用一个URI方案,如下图所示。

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.

固定

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

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

用户

pinterest://pinterest.com/carlrice/

这篇关于如何整合Pinterest的我的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆