What is the most reliable way currently to allow pinterest sharing from iOS app?
Pinterest API is not public yet and only suggested way to share is their web button.
What is the most reliable way currently to allow pinterest sharing from iOS app?
Pinterest API is not public yet and only suggested way to share is their web button.
I made a pinterest integration in my iPad app. But, because Pinterest doesn't have an API for posting yet, I used the following method. I just create programmatically an HTML Web Page and add a Pin it button to that page programmatically. Then I show a Web View and allow user to click Pin it once more. These are more explained steps.
1) Create a WebViewController, that has a UIWebView. Add Close button, add UIWebViewDelegateProtocol, spinner, htmlString property.
2) Generate an HTML programmatically to put to that UIWebView, when user clicks your "Pin it" button in your app. In this case I put to the HTML page different images for different products.
This is an example of my HTML page generation method.
3) Create a method to call when user taps your "Pin it" button, which shows that webView with the image, that you will post and the "Pin it" button on the UIWebView. This is my example:
4) Put a "Close" button to your WebViewController to close it. Also you can add spinners to track the loading of the UIWebView.
}
P.S. I used the same method to add Google Plus's +1 button to the iPad app. (It doesn't have posting API too, only readonly API at the moment)
I tried to integrate Pinterest with Custom URL Scheme, also download the Pinterest application on my device, but not abel to integrate with it.
And the thing is that i don't want to used webView for integration so is it possible to do that, i didn't found any application on app store which have pinterest integration.
I did googling also but all worse, Snapguide also remove pinterest integration from their application.
I used a webView code to pin image , no need to open full Pinterest website,
This would be easy but with webView and that i don't want.
As of May 20th 2013, Pinterest have released an iOS SDK for pinning content.
Check out their Developers site for more information.
If you only want to share(i.e. pin on a user board), then you can use iphone-URL-Scheme and call the Pinterest application along with the parameters url(URL of the page to pin), media(URL of the image to pin) & description(Description of the page to be pinned). Present a UIAlertView and forward them to appstore to download the official Pinterest application if the user has not installed it.
Reference: http://wiki.akosma.com/IPhone_URL_Schemes#Pinterest
Code to open Pinterest Applicaiton:
UIAlertViewDelegate Method
I've looked high and low too. I've even contacted Pinterest Team about an SDK. The closest thing I have found is a PHP wrapper on github https://github.com/kellan/pinterest.api.php.
It's not the best solution though because it is unofficial api and will most likely break.