Integrating Pinterest in iOS Application


Pinterest do not provide api's for integration yet.
So in order to achieve it we need to use UIWebView in iOS App.

Follow below steps:
1. Take a UIViewController containing two buttons, one UIWebView.
2. Generate HTML programatically and pass it to loadHTMLString in UIWebView.
3. On touchup-inside of first button, load html string which will open Pinterest in UIWebView.
4. Here pass your custom description and image url which you want to pin.
5. On touchup-inside of second button, close/hide the UIWebView.
















Download Code from here: PinterestiOSIntegration

Above link helped me out.

Comments

  1. Great code, thanks! Do you know if it would be possible to pin a file stored in the iOS file system? That is, do a file upload, similar to Pinterest's Add button?

    ReplyDelete
    Replies
    1. I'm interested in this also. Any thoughts on how to pin a file stored in the iOS file system?

      Delete
  2. Someone has created a framework for this...
    http://www.varshylmobile.com/pinterest-framework-for-ios
    Download the sample app, the code is commented nicely..should be no problem.

    ReplyDelete

Post a Comment

Popular posts from this blog

UITableView - Add or Remove Rows Dynamically (Objective C & Swift Source codes)

payUmoney Payment Gateway Integration in iOS App (Objective C)

Check Internet Connectivity Using AFNetworking 2.0