From 88c451c04751778a39b737b796ca2f995b10f3fe Mon Sep 17 00:00:00 2001 From: James Kirby Date: Mon, 29 Jun 2015 12:15:42 +0100 Subject: [PATCH 1/2] Incorrect key => value for the image. The key and value pair were the wrong way round. It should be searching for `image` in the data within the `Page` instance, and assigning that to a `media` get param. --- src/Providers/Pinterest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Providers/Pinterest.php b/src/Providers/Pinterest.php index 15a0ffb..f680a92 100644 --- a/src/Providers/Pinterest.php +++ b/src/Providers/Pinterest.php @@ -13,7 +13,7 @@ public function shareUrl() array( 'url', 'title' => 'description', - 'media' => 'image', + 'image' => 'media', ) ); } From e81eafd5e102645788c364aad54ca9d57dc8b5e7 Mon Sep 17 00:00:00 2001 From: James Kirby Date: Mon, 29 Jun 2015 12:24:52 +0100 Subject: [PATCH 2/2] Updating the test for the pinterest share URL to account for the image which is now working due to my previous commit. --- tests/BasicTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/BasicTest.php b/tests/BasicTest.php index b35090c..f5959c7 100644 --- a/tests/BasicTest.php +++ b/tests/BasicTest.php @@ -40,7 +40,7 @@ public function testProviders(Page $page) $this->assertEquals($page->mailru->shareUrl, 'http://connect.mail.ru/share?url=http%3A%2F%2Fmypage.com&title=Page+title&description=Extended+page+description&imageurl=http%3A%2F%2Fmypage.com%2Fimage.png'); $this->assertEquals($page->meneame->shareUrl, 'http://meneame.net/submit.php?url=http%3A%2F%2Fmypage.com'); $this->assertEquals($page->odnoklassniki->shareUrl, 'http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl=http%3A%2F%2Fmypage.com'); - $this->assertEquals($page->pinterest->shareUrl, 'https://www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fmypage.com&description=Page+title'); + $this->assertEquals($page->pinterest->shareUrl, 'https://www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fmypage.com&description=Page+title&media=http%3A%2F%2Fmypage.com%2Fimage.png'); $this->assertEquals($page->plus->shareUrl, 'https://plus.google.com/share?url=http%3A%2F%2Fmypage.com'); $this->assertEquals($page->stumbleupon->shareUrl, 'https://www.stumbleupon.com/submit?url=http%3A%2F%2Fmypage.com&title=Page+title'); $this->assertEquals($page->tumblr->shareUrl, 'https://www.tumblr.com/share?v=3&u=http%3A%2F%2Fmypage.com&t=Page+title');