简体   繁体   中英

How to achieve Followboard button functionality in Pinterest using iOS Pin It SDK?

I'm using iOS Pin It SDK in my app to achieve desired functionality required for Pinterest social data like fetching boards and pins details and also for Pinit button functionality etc. but still I'm unable to achieve "Followboard" functionality.

If anybody can suggest any appropriate solution then it would be helpful for solving the problem, as I've done with my tricks regarding the issue.

Currently there is no possible solution available for this functionality in Pinterest API, for while you can open your Pinterest Page in the official provided Application if available else open it in browser so that user can follow the page or board through this using following piece of code:

- (IBAction)openPinterestUser:(id)sender {

// Open the Pinterest App if available
if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"pinterest://user/pagename"]]) {

    // Opening the app didn't work - let's open Safari
    if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.pinterest.com/pagename/"]]) {

        // Nothing works - perhaps we're not online
        NSLog(@"Oops!");
    }
  }
}

- (IBAction)openPinterestBoard:(id)sender {

    // Open the Pinterest App if available
    if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"pinterest://board/boardname"]]) {

        // Opening the app didn't work - let's open Safari
        if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.pinterest.com/boardname"]]) {

            // Nothing works - perhaps we're not online
            NSLog(@"Oops!");
        }
    }
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM